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

Mandatory reviewers check during pull request creation.

Mohan Krishan March 26, 2024

Hello,

We want to setup a check during PR creation /opening. When we press create button, this check should identify that the provided reviewers list is a superset of repo default reviewers. i.e. all default reviewers are included in the PR reviewers list. If this check fails, a message should be displayed to the user and PR creation process should be aborted. Is their a plugin or mechanism to achieve this?

Regards,
Mohan

1 answer

1 vote
Ulrich Kuhnhardt _IzymesCo_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
March 26, 2024

Hi Mohan,

it's Ulrich here from Izymes.

if I understand your question correctly you want to make sure that a mandatory set of reviewers is always included in pull requests.

So far Bitbucket (DC) lets you define default reviewers and when a PR is created the reviewers list is populated based on default reviewers, HOWEVER the list can be modified by the author of the PR.

You are implementing a more consistent PR review process which needs to make sure a certain set of mandatory reviewers is _always_ present.

If you define mandatory reviewers in Workzone - these individual mandatory reviewers or groups (AD groups or repo groups) will always be added when a PR is created. Even if the PR is edited and reviewers are removed, Workzone will add them back.

On top of that Workzone will require all or a minimum number of mandatory reviewers to approve before a PR can be merged. 
If you want to target different mandatory reviewers based on different files/paths you can set mandatory reviewers/group per file/path with minimum approval quotas as well. This is a huge time saver because mandatory reviewers are only added according to the PR's changeset (affected files).

Pheewww- that's a lot! Let me know if Workzone is something that would solve your problem and we'll get you started.

Cheers, Ulrich

// Izymes

Mohan Krishan March 27, 2024

Hi Ulrich,

Thank you for the detailed information. We are already using Workzone for PR auto-merge feature. Let me try the reviewers use case; hope it will not conflict with default reviewers. I think i can set same set of default reviewers in Bitbucket and Workzone with same value for the minimum approval quota.

I also don't see any option to configure setting - all or a minimum number of mandatory reviewers to approve before a PR can be merged. 

Regards,

Mohan 

Ulrich Kuhnhardt _IzymesCo_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
March 27, 2024

Hi Mohan,

good news: Workzone adds mandatory reviewer users or groups and enforces only approvals for mandatory reviewers configured in Workzone.

Workzone won't interfere with or be interfered by repository default reviewers and min approval count. Bitbucket will run the min approval count merge-check (on repo default reviewers) and Workzone will run the mandatory approval count merge-check (on workzone mandatory reviewers). Only if both are passing the PR can be merged. Default reviewers and mandatory reviewer namespaces can overlap (see below)

Workzone merge configuration for your  PR (source-optional) and target branch allows you to set a mandatory approval quota, which could be the same as the BB repository min approval quota.

Here is a handy sketch that illustrates how repo default reviewers and workzone mandatory reviewers and merge control can work together

min mandatory approvals.png

Hope all makes sense, let us know if we can be of any further assistance. Cheers Ulrich

Mohan Krishan March 28, 2024

Thank you for the details. So, as per my understanding, approval quotas in Workzone can be set only with the automatic merge configuration. It can not be independently configured. 

Mohan Krishan March 31, 2024

Gentle reminder. 

Ulrich Kuhnhardt _IzymesCo_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
April 1, 2024

Hi Mohan,

this is correct. Workzone specific approval quotas (mandatory or else) are configured in the Workzone 'Merge' configuration for PR target branches or patterns.

If you don't specify a merge-configuration (with a quota) for mandatory reviewers, Workzone implies that 100% of mandatory reviewers on the PR must approve, I guess that's what you refer to as 'independent' reviewer configuration?

 

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
8.9.10
TAGS
AUG Leaders

Atlassian Community Events