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

How to restrict user merging it's own PR

Jay Mehta
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 19, 2023

Our use case is that nobody from the team should be able to merge its own branch.

 

I know one solution is that we increase the approval required to 2, which will ensure that at-least someone then the owner of PR has provided approval.

 

But my question is, is it possible to keep the approval required to just 1, but the user cannot approve their own PR and has to take approval from a peer?

 

Any help would be appreciated.

1 comment

Ulrich Kuhnhardt _IzymesCo_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
January 21, 2023

Hi Jay,

To be able to control how pull requests are merged, you should enabled enforced merge checks (Bitbucket premium). You can set the number of required approvals to "1" and nobody can merge the pull request unless 1 reviewer (other than the author) has approved the PR. Author approvals don't count towards the quota.

While Bitbucket premium comes at a price point, which may be not a problem for you - there are other tools/apps in the Atlassian Marketplace that address this issue. We came across the same problem and made Workzone for Bitbucket Cloud available on the Atlassian Marketplace. It follows the same pattern but simplifies the pull request review and approval process, and enforces merge-checks as well.

Best, Ulrich

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events