Branch protection, Mergify's conditions, and repo permissions #5115
-
I'm struggling to understand how github's and mergify's respective protection rules interact with repo permissions. In particular, as described here. Would a more permissive merge condition "bypass" a more restrictive branch protection rule? If not, what prevents users with I think that'd be possible, because github branch protection would have to be relaxed to support the more permissive mergify conditions? Would this behave differently if mergify conditions were instead implemented using post_checks? Another way of asking my question is: does mergify add or remove restrictions, and if so, how? Are its restrictions intended to apply to users with Apologies for rambling, I'm struggling to articulate my question! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi Mergify can't bypass GitHub's branch protections. Mergify has its own rules to perform actions, like merging or creating a check-run. See it like a wrapper on GitHub. If you want to prevent someone from merging manually, you have to protect the branch using GitHub's branch protections, so the UI disables the manual merge. Either Mergify is the only one who can merge, or Mergify can post a check-run (using the I hope that answer your question. |
Beta Was this translation helpful? Give feedback.
Hi
Mergify can't bypass GitHub's branch protections. Mergify has its own rules to perform actions, like merging or creating a check-run. See it like a wrapper on GitHub.
If you want to prevent someone from merging manually, you have to protect the branch using GitHub's branch protections, so the UI disables the manual merge. Either Mergify is the only one who can merge, or Mergify can post a check-run (using the
post_check
action) to meet the branch protection requirements. That's how you achieve finer-grained branch protection.I hope that answer your question.