Missed Team ’24? Catch up on announcements here.

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

Custom Repository Merge Check

Arti Kumar August 9, 2018

I am at the stage of checking feasibility for a particular feature request.

There is a need to enforce a custom merge check on a particular repo.

The merge check needs to ensure that there are certain specific user approvals already attained on the pull request. If yes, enable it else disable merge check.

Is that level of customization possible? Any other ideas?

1 answer

0 votes
Isabella Stephens
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 9, 2018

Hi Arti,

Bitbucket Server lets you require specific user approvals on pull requests with the Default Reviewers settings. Does this provide the functionality you're looking for?

Cheers,

Isabella - Atlassian

Arti Kumar August 10, 2018

Hi Isabella,

Thanks for your response.Let me explain in detail.

Lets say we have a repository with default reviewers a,b,c,d,e,f and we've set the minimum no. of approvers to be 2.

Now only on some Pull Requests on this repo we want an extra level of approval by a board of people we have. The no. of people in the board will be added as reviewers to these pull requests through an edit. Now we want to ensure that this merge is not enabled until atleast half of people on this board approve.

Now the only way to highlight this PR might be to write a specific comment to it (or if you have other ideas) . This comment should trigger the merge check to attain 50 % approvals of the board of people that I just mentioned.

Isabella Stephens
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 12, 2018

Hi Arti,

Thanks for clarifying. The Default Reviewers settings will let you specify different rules for different branches, so if your workflow is set up so that pull requests requiring extra approval are targeted at a different branch, then the Default Reviewers settings should do the job.

If that's not the case, you may be able to find an add-on on the Atlassian Marketplace that provides the functionality you're looking for. Another option would be to write your own Merge Check add-on. We have some documentation on how to do that here.

Arti Kumar September 4, 2018

Can a custom merge check add-on (like you suggested) be applied to a specific repository(only)? 

I was able to run the example merge check provided in the documentation you referenced but it applies to the entire bitbucket instance

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events