Check who can merge a code change

Find the review decision for a specific revision and check what allows it to land in Bitbucket Cloud, Azure Repos, Gerrit or SourceHut.

Before you start

  • Use a harmless change in a test repository. Ask someone who can inspect the target branch rules and arrange for a reviewer and a contributor without bypass permissions.
  • Record the repository, destination branch and revision you intend to review.
  • Check Bitbucket availability

Data and access

Shared or checked
The code host records the reviewer and revision. A branch rule or maintainer workflow determines whether that review is enough to land the change.
Check separately
A review does not grant repository access or release permission. Check any new revision and its required checks.

Compare approval rules

Bitbucket
The author’s approval does not count toward the minimum. On Premium, you can enforce that minimum and clear approvals on a new push. Check whether approvals carry forward when the diff stays the same.
Azure DevOps
The minimum-reviewer policy is off by default. When you enable it, check whether the requester’s or latest pusher’s votes count and whether a new push clears votes or requires a fresh approval.
Gerrit
Check which label scores satisfy the submit requirement and who can cast them. The label’s copy condition decides whether a vote carries forward to a new patch set.
SourceHut
Check whether a maintainer marked the latest patch set accepted. Confirm the destination commit separately. The patch status records a review decision, while the commit shows what landed.
  1. Bitbucket Cloud

    Open Branch restrictions and check the rules that match the destination branch. Look for the required approval count and successful builds on the latest commit. The Premium setting Prevent a merge with unresolved merge checks enforces those checks. Without it, Bitbucket warns about unresolved checks and can still allow the merge.

    Check. On the current pull request, record the destination rule, the revision the builds cover, and whether the checks block a merge.

  2. Azure Repos

    Open Branch policies for the target branch. Check the minimum number of reviewers and whether Build validation is Required. Review the branch's permissions for bypassing policies when completing pull requests and when pushing. On the test pull request, inspect the approval and build results for the current revision.

    Check. The current revision shows the required reviewers and build result. Record any bypass permission separately.

  3. Gerrit

    Open the change and select its current patch set. In Submit Requirements, inspect the rules and the votes that satisfy them. Check who has Submit access and whether any requirement was overridden. A new patch set may affect votes, depending on the project's label rules.

    Check. Review the current patch set’s Submit Requirements and the votes that satisfy them. Record an override if one is present.

  4. SourceHut

    On a test project's mailing list, open the latest revision of the patch series and read the review thread. If the project records a patch status, check it alongside the discussion. Compare the reviewed patch with the commit on the destination branch after the maintainer applies it.

    Check. The mailing-list review identifies the patch revision the maintainer applied. Compare its changes with the destination commit.

  5. Check the result

    For an enforced merge rule, check that the test change is blocked before the requirement is met, then record the authorized review and merge. If you submit a new revision, repeat the check on that revision. For a mailing-list workflow, record the reviewed patch and the resulting branch commit separately.

    Check. Keep the links to the blocked and later allowed results for the same test revision. For SourceHut, keep the reviewed patch and destination commit.

Check your result

Keep the link to the exact review and record the destination commit. For enforced rules, keep both the blocked and allowed results for the test branch.

How to verify your setup

If you get stuck

The change landed before review

Check which rule matched the branch, whether the check was enforced and whether the acting account had a bypass. On SourceHut, check who can write to the destination branch and how the project records maintainer decisions.

Report a problem with this guide

Explore all setup guides →