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