Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Branch permissions bypassed

Rebecca Knoph
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 19, 2018

I’m having some trouble getting branch permissions to stick.  

We plan to have only admins able to make changes to our repo’s master branch.  Developers can clone the repo and then create their own dev branch off of master to work on. When developers feel ready, they can merge their development branch onto the master branch using a pull request. However, they will not be able to merge their dev branch into master until the admins have approved the changes.  At least… that’s the plan.

So here’s what I tried to do:

On Bitbucket, I set branch permissions as shown in the picture.  My understanding is that this means only two people (Rebecca and Julie) can make changes to the master remote branch automatically.  If a developer (who is not an admin) wants to make changes to the master remote branch, he/she can only do so by initiating a pull request AND getting 2 people to approve the merge.

 ­­­Untitled.jpg

Untitled2.jpg

We tested this by having a developer make changes on their own dev branch. The developer then committed and pushed those changes to the remote dev branch.  Perfect.  All works as expected.

Next, the developer initiated a pull request to merge the remote dev branch into master.  Awesome.

Untitled3.jpg

At this point, I expected the developer would need at least two people to approve the pull request.  Instead, the developer was able to just click “Merge” and the dev branch merged into master despite 0 approvals (although a warning that two approvals is needed did show).  Why is this happening?  And how do I fix this?

Untitled4.jpgUntitled5.jpgUntitled6.jpg

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events