Hello,
I would like to have an option to specify a specific user as a reviewer for a repository where he/she needs definitely to approve a PR before a merge can happen.
Thank you in advance!
Kind regards,
Dennis
Repository --> Settings --> Default reviewers
Set the "Approvals Required" to 1, and put their name in the "Default reviewers" box.
I recommend setting this up so it only triggers on merges into 'master' and 'release/*'. In other words:
Source Branch: Any
Target Branch: master
(and then add another "Default Reviewers" config for Target Branch: release/*).
Meanwhile, you also need to configure things so that all changes into 'master' and 'release/*' must go through pull-requests (otherwise people can just directly push to master). This "Default Reviewers" control only applies to pull-requests. It does not apply to direct pushes.
My free Control Freak add-on is good for enforcing mandatory pull-requests against the major branches globally (e.g., master, release/*).
Thank you for the quick response!
The option you describe to achieve the goal would mean I have to define only one default reviewer. However I would like to have more than one default reviewer.
So it sounds to me like a workaround. Do I oversee something?
Kind regards
Dennis
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I encourage to play with the "Default Reviewers" feature of Bitbucket Server in your local instance. I think it will achieve everything you need. Here is the documentation for the feature: Add default reviewers to pull requests.
---
To your specific followup question:
You can put as many people as you like in the "Default reviewers" box for each reviewing rule you add. The names in the box will all be automatically linked to all PR's that match the Source / Target branch patterns specified for that particular rule.
Note: if you set "Approvals Required" to 1 yet have two names in the "Default reviewers" box, then either one of the 2 people can click "Approved" before the PR can merge.
If you set "Approvals Required" to 2 and have exactly 2 names in the box, then both of those 2 default reviewers must approve every PR their reviewing rule matches against. This can slow things down since it creates a bottleneck, especially in busy repositories.
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.