-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Looping when branch protection disallows merge commits #190
Comments
The more general problem is that we treat every failed push as a conflicting commit to master, and thus as a reason to retry: Lines 808 to 823 in 266379e
I'd say we should instead whitelist the causes that are know to be fixable by retrying, and give up on the PR (with a comment) in all other cases. Then we also wouldn't necessarily need custom logic for detecting branch protection rules - depending on how good the error messages are we get back from a failed push. |
Recently we've seen that on repositories where branch protection forbids merge commits into
master
,hoff
can loop (since it attempts to fast-forward merge on successful builds). GitHub has an API for checking the protection on a branch, we should check that the branchhoff
will merge into has compatible permissions.Since branch protection configuration can change, we should either listen for changes in branch protection rules if possible, or check at the start of every
hoff merge
. If branch protection rules would prohibithoff
from merging, it should comment this on the PR so users are aware.The text was updated successfully, but these errors were encountered: