Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Default reviewers approvals required matching multiple rules

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.

1 answer

0 votes
Marty Atlassian Team Feb 25, 2019

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.

Screen Shot 2019-02-26 at 9.15.09 am.png

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).

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

New improvements to user management in Bitbucket Cloud 👥

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...

3,930 views 10 16
Read article

Community Events

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

Events near you