Hi everyone,
I am really struggling with branch permission setup.
I set the below permissions up for all repo's in our company. I was told by devs that this would 1. make sure no one can write direct to develop branch (our main branch) and 2. make sure every merge attempt required at least 1 approval.
What I found today was that my team has found a way around this - they make a new branch (which is fine) - let's call it "test-branch-1". This new branch doesn't have any permissions. They then create a pull request and are able to click "merge" without actually adding a reviewer.
My ideal state is that everyone can review each other's code, but no one should be able to merge to master OR develop without 1 approval.
Any help would be appreciated. I'm relatively new to git management.
Hi @Nick P,
Branch permissions does not control when a pull request can be merged. In order to not allow users to create a pull request and then click the merge button right away, add the Check for at least 1 approval.
You also need the Premium option Prevent a merge with unresolved merge checks.
TY for the response.
I should have specified, I definitely have this box ticked for all my branch permissions, however it doesn't seem to enforce this rule if the person falls under the "Everybody" category to merge.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do you also have the premium option checked? Without it all the Check for at least X approval will do is notify you that the pull request has not been approved, but it will not prevent the merge from happening.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.