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.
Hi Tom,
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!
Marty, your suggestion does not help in situation where I want to lower restrictions for master -> release PR but want to be more strict otherwise (any other branch -> release).
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.