Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,298,558
Community Members
 
Community Events
165
Community Groups

Enable merge button post at least two Pull request approvals

Edited

We need to enable the merge button in bit bucket only when the Pull request from any new branch (other than develop, release or master) to another branch is approved by at least two approvers/reviewers. 

Please assist if we can implement this for a particular project.

 

Thanks

 

1 answer

0 votes
Caroline R Atlassian Team Oct 06, 2021

Hi, @gaurav kumar!

Thank you for reaching out to Atlassian Community!

Currently, you can suggest or require checks before a merge. Merge checks allow you to recommend or require specific conditions (like approvals on a Pull Request) on merges for individual branches or branch patterns.

Providing your users with recommended checks to consider before merging is available to everyone. However, enforce merge checks is a Premium feature.

In order to set merge checks, you can follow the next steps:

  • Go to Repository settings > Branch permissions

  • Click Add a branch permission.

  • Select the branch by name or pattern or by type

  • In Write access, add the users and groups who can push or merge any changes to this branch directly

  • In Merge via pull request, add the users and groups who can merge to this branch via pull request

  • And finally, in the Merge checks options, you can select:

    • Check for at least 2 approval

    • Check for at least 2 approval from default reviewers

This way, if someone tries to merge this Pull Request, they will see the following message, but they will still be able to merge the PR: 

Screen Shot 2021-10-06 at 5.30.10 PM.png

To enforce these merge checks (and disable the merge button until they are resolved), you will have to check the "Prevent a merge with unresolved merge checks" setting in the branch permission which is only available on the Premium plan: 

Screen Shot 2021-10-06 at 5.39.27 PM.png

In case you would like to read more about merge checks, you can access the following documentation: 

I hope this information helps, but please feel free to share any additional questions regarding this case.

Kind regards,
Caroline

Suggest an answer

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

Git push size limits are coming to Bitbucket Cloud starting April 4th, 2022

Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...

2,231 views 2 9
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