Hi there,
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?
Many thanks!
Regards, Bert
Hi Bert,
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.
Alastair
Product Manager, Bitbucket Cloud
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.