So we have an issue with bitbucket server, which I have not been able to figure out nor have I found any documentation.
In our workflow we want to have all branches being merged into our master branch to have a minimum 2 reviewers with the exceptions of hotfix/ prefixed branches. In the default reviewers configuration we have setup a "All Branch" source with a master target requiring 2 reviewers. We then setup a hotfix/ prefix source with a master target requiring 1 reviewer. The problem we are having now is hotfix/ branches are still requiring 2 reviewers.
I don't know how the hierarchical or merge structure is setup for branch permissions so I don't know my best path forward.
I am not on the Bitbucket team but I will try to help.
I assume you're using Bitbucket Cloud?
Let's tease apart some concepts because Default Reviewers only refers to the people automatically added as reviewers on any new Pull Requests. The in-product description says "The following users will be added as reviewers on new pull requests by default."
It looks like you can only setup one set of default reviewers for the entire repository.
You can set default reviewers via Repository Settings -> PULL REQUESTS (heading) -> Default Reviewers.
A separate concept is Branch Permissions.
Branch Permissions control who can write to a branch or merge a pull request and how many approvals are needed. It sounds what you really want is to have 2 approvals required for master but only 1 approval required for hotfix/ ... is that right?
If so, you want to add 2 branch permissions - one for master and one for hotfix/
For example, here is what my branch permissions look like for one of my repositories.
You can set branch permissions via Repository Settings -> WORKFLOW (heading) -> Branch permissions.
I hope that helps!
Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events