The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Ulrich Kuhnhardt _IzymesCo_
Atlassian Partner
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

TAGS
AUG Leaders

Atlassian Community Events