If you always squash-merge, the unsafe --force flag is always required.
Instead, ideally gh-clean-branches should do one of:
- GH API query to get the commit hash just before it was merged (check that it's identical to or ahead of the local branch)
- try to merge
main into the local branch (and check that the diff is empty)
If you always squash-merge, the unsafe
--forceflag is always required.Instead, ideally
gh-clean-branchesshould do one of:maininto the local branch (and check that the diff is empty)