We're using Bitbucket cloud and lately we have activated premium to use branch permissions. This works great, except when we create a hotfix branch, prefixed with "hotfix/" (eq. the git flow principles) and want to merge the hotfix back into master and develop.
This is how we have branch permissions configured;
This normally is exactly what we want. Every developer can PR to develop, merge when they got enough approvals and they can create a PR to master (for production release request) but normal developers can't merge it since that's a "admin" only task.
So far so good.
In the case of an hotfix...
As developer I branch from master and create an branch like hotfix/incident-name and I fixed the hole. I commit and send a PR to get my review and approvals. Also don't check "close branch after merge" checkbox. Since the hotfix needs to be merged to develop too.
Any admin user should be triggered to merge the PR. Which is no problem. After that I want to merge to develop too. As admin I know that I have to merge a hotfix to develop too, but since I have configured branch permissions, I do need to wait for approvals again.
At the moment I temporarily remove the "merge checks" prevent option from the develop branch, and merge the hotfix instantly. But that can't be the solution I think.
Is there another way to get this done more easily?
Thanks for your question.
At this time, I can't think of a way to do this more easily; you'll either need to get the approvals again (for the second PR) or temporarily disable the merge check. The branches have no way of 'knowing' their place in the hierarchy.
I'm sure it could get pretty complex pretty fast, but this is a neat problem to solve! Thanks for bringing it to our attention.
Product Manager, Bitbucket Cloud
Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs