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

Can I forbid people to approve their own changes on a pull request?

Fabian Schmied
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!
March 7, 2023

Using Bitbucket Server, I want to ensure that every change is reviewed by a different person before it can can be merged to the main branch.

I therefore

  • configure Branch Permissions on main to require a pull request for every change, 
  • I configure that every pull request needs at least one approval, and
  • I configure the auto-unapprove plugin to automatically withdraw the approval if additional changes are pushed to a pull request.

Now, let's say, a colleague of mine opens a pull request in Bitbucket Server and assigns me as a reviewer. I then push a change to the pull request's branch and then I approve the pull request. This has successfully circumvented the original requirement that every change is reviewed by a different person.

Can I somehow prevent that?

1 answer

1 accepted

2 votes
Answer accepted
Ulrich Kuhnhardt _IzymesCo_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
March 7, 2023

Hi Fabian,

that's a great question. It's a good idea to keep your pull request workflow clean so that your very clever developers can't cut corners :D

I don't think the 'ignore committer approvals' feature is available in Bitbucket server/dc.

We have built Workzone for Bitbucket enterprise teams that offers extensive reviewer and merge configurations.

On of the features is 'Ignore committer approvals' in Workzone's merge configuration . When Bitbucket+Workzone count pull request approvals for a merge-check (the verdict whether or not a PR can be merged or not) any reviewer who has also committed code to the PR source branch and is therefore part of the changeset authors will be ignored when counting approvals.

With this setting in place the effective approval count would be 0 in your use case.

I hope this helps, let us know if you need any further assistance solving your use case.

Best, Ulrich

// Izymes

Fabian Schmied
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!
March 10, 2023

So this is not possible in Bitbucket server per se, but Wokzone would solve it. Thank you for your answer!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events