How to force at least one other developer to review a PR before it can be merged?

SH
Contributor
December 12, 2024

 

 

All our repos have the following branch restrictions for our develop and master branches:

  1. Check for at least 2 approval
  2. Check for at least 1 approval from default reviewers
  3. deleting this branch not allowed
  4. rewriting branch history not allowed
  5. check for unresolved pull request tasks.
  6. Merge access via pull requests: everyone with access to the repo has merge access

The problem is the above restrictions are completely ignored by bitbucket.  Any developer can merge their PRs without anyone approving them.  The developers all have write access but not admin access.

We hope that there is a way to enforce this. Any suggestions?  It would seem to be a major limitation.

 

Note: All developers have write access at the repository level, as this is the min requirement to be able to merge. 

 

Even worse, Ive just tested and developers can push the develop and master branches directly, without PR. How do we prevent this, given the branch restrictions are ignored?

 

Ive just tried removing write access at the repo level to "Nobody has write access". This did block users from pushing directly to the restricted branches, did allow them to push to non restricted branches, BUT still allows them to merge restricted branches without the required Approvals.

Is there no way to force approvals being required?

1 answer

0 votes
Saxea _Flowie_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 12, 2024

Hi @SH,

Have you enabled the Prevent a merge with unresolved merge checks? It is in branch restrictions, below the merge checks.

x.jpg

It's part of Bitbucket premium plan only.

We also offer enforced merge checks, with these same checks but with more configuration options, and more built-in check with Flowie, our Bitbucket cloud addon, that you might be interested too. It also works on other plans, and it doesn't require premium.

 

SH
Contributor
December 12, 2024

I cant deny that I'm shocked and disappointed that our organization is paying six figures a year for bitbucket, and we cant enforce approvals.   Due to the cost, the org is planning to migrate to a different provider, so we don't have any hope of getting premium.  WE cant even get reports to show when developers merge prs without approval (its a big problem for us), as bitbucket has no reporting to speak of.

Saxea _Flowie_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 12, 2024

We offer discounts for large workspaces, so it might work out as a more cost effective  solution too, compared to a migration, for instance. You can reach us on support@flowie.app, if you would like to explore this option.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events