We have many repos and many developers.
All repos have a branch restriction for our develop and master branch which is:
The problem is any developer, who only has write permission (not admin), can merge their own pull requests with no reviewers.
Because we cannot enforce that at least one person has reviewed a given PR, we end up with unreviewed and unchecked code being merged.
Why does "check for at least X approval" not work? How can we enforce that PRs cant be merged to a given branch without approval?
Hello @SH ,
Thanks for reaching out.
This happens because, by default, the merge checks are just a suggestion for the developer, meaning that the developer can still merge the changes even though not all the merge checks were met (see Suggest or require checks before a merge)
The ability to enforce that each and every merge check is satisfied before a developer has access to merge is part of the Premium plan, where you would need to enable the option "Prevent a merge with unresolved merge checks" in the branch restriction :
This would enforce that all the merge checks configured in that branch restrictions will be mandatory before the users are able to complete the merge. Even though they see the merge button, with that option enabled, they wouldn't be able to complete the merge and a warning message will be shown.
I'm sharing below the instructions to upgrade your plan in case you decide to upgrade to Premium to use the merge check enforce feature :
Hope that helps! Should you have any questions, feel free to ask.
Thank you, @SH !
Patrik S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.