Forums

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

Creator of PR is allowed to self approve and merge if requires 1 approval is set for merge checks?

Michael Brizic October 23, 2019

Bitbucket Cloud

If I enable branch permissions and merge checks to require 1 approval to allow merging to master the creator of the PR is allowed to approve their own PR and then merge.

If, however, I set the requires approval to 2, then the creator's self approval does not count and requires two different, separate approvals in order to merge.

Is this intentional?

1 answer

1 accepted

0 votes
Answer accepted
Daniil Penkin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 24, 2019

Hello @Michael Brizic,

Thanks for reaching out.

This doesn't sound right, creator's approval should never count. I quickly double checked in my repository and can't reproduce the behaviour you're describing.

Can you link to the pull request where this happened? You might want to raise a support ticket to share the details privately. Can you please also confirm that you have "Prevent a merge with unresolved merge checks" checkbox enabled in the relevant branch permission (and double check that its pattern/branch type matches the one PR was targeted to)?

Let me know what you find.

Cheers,
Daniil

Michael Brizic October 24, 2019

Ok thanks for your reply.

Is it that "Prevent a merge with unresolved merge checks" is required to prevent creator of PR self-approve?

Once I set that it is working now.

Daniil Penkin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 24, 2019

No, that checkbox enforces merge checks. That is, when it's off you'll only see a warning if some merge checks are not fulfilled but it won't stop you from merging. When it's on, merge checks are actually blocking the merge unless they're all resolved.

As for the approval from PR creator (self-approval basically), it never counts. Honestly, I don't know for sure why it's being kept as a feature. I believe it might be useful in some workflow for indicating that the PR is ready for review, for instance if the author finished addressing some feedback they got earlier.

Hope this helps.

Cheers,
Daniil

Michael Brizic October 25, 2019

Ok that explains it, thanks!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events