In Bitbucket Cloud, why can a developer merge a pull request with one approval when main's merge check requires two?
answer
- warning versus block
- which plan enforces
- one setting flips it
- whose approval does not count
- checks attach to a branch
basics
~20 sBitbucket Cloud merge checks only warn unless the workspace is on Premium and the restriction selects Prevent a merge with unresolved merge checks. Without that, the merge checklist shows the missing approval but anyone with merge access can still merge.
solid answer
~40 sMerge checks live in the branch restriction for a branch or pattern: minimum approvals, minimum approvals from default reviewers, no changes requested, no unresolved pull request tasks, a minimum number of successful builds on the last commit with none failed or in progress, and a maximum number of commits behind the destination. On any plan they produce a **merge checklist** that warns. Only on **Premium** can an admin select **Prevent a merge with unresolved merge checks**, which blocks merging until the list is clear. Two more traps: the author's own approval never counts toward the minimum, and a check on `main` says nothing about a pull request into `develop`. Premium also offers **Reset approvals when the source branch is modified**, so an approval given before a late push stops counting.
go deeper
Recall that merge checks list conditions such as approvals, builds and tasks, and that a checklist with warnings does not always stop a merge.
Explain warn versus enforce: which plan and which setting turn checks into a block, and why the author's approval does not count.
Walk through diagnosing a merge that slipped through: plan, enforcement setting, which restriction matched the target branch, and stale approvals.
Decide which checks justify blocking and which should stay advisory, weighing review fatigue from approval resets against the risk of stale approvals.
## What a merge check is In Bitbucket Cloud a **merge check** is a condition attached to a branch restriction — a branch name, a pattern or a branch type — that a pull request into that branch is expected to meet before it is merged. Branch permissions decide *who* may merge; merge checks decide *when*. When a pull request is about to be merged, the unmet checks appear as a **merge checklist**, each unresolved item with a warning label. The checklist is what a developer sees. Whether it actually stops them is a separate question, and that is where most "why did this merge?" incidents come from. ## The checks you can select | Setting | What it checks or does | Plan | |---|---|---| | **Minimum number of approvals** | Fewer approvals than the number set; the author's own approval does not count | Any | | **Minimum number of approvals from default reviewers** | Too few approvals from the default reviewers | Any | | **No changes are requested** | Any reviewer has marked *Changes requested* | Any | | **No unresolved pull request tasks** | The pull request has open tasks | Any | | **Minimum number of successful builds for the last commit with no failed builds and no in progress builds** | The latest commit lacks enough green builds, or has a failed or running one | Any | | **Maximum number of commits behind destination branch** | The source branch has fallen too far behind | Any | | **Prevent a merge with unresolved merge checks** | Turns every check above into a block | Premium | Builds come from whatever reports commit status to Bitbucket: its own Pipelines, a build tool integration, or the commit status REST API. ## Warn versus enforce This is the heart of the question: - **Without Premium**, every check above is advisory. Bitbucket warns users with unresolved checks, but they can still merge. - **With Premium**, an admin can select **Prevent a merge with unresolved merge checks** on the restriction. Then the merge cannot be executed until the checklist is clear. So a team that set "minimum 2 approvals" on a Standard workspace has written down a policy, not enforced one. The fix is the plan plus the setting, not another check. ## Approvals that go stale An approval is given against a version of the pull request. If the author pushes more commits afterwards, the approval may describe code that has since changed. The settings that handle this: - **Reset requested changes when the source branch is modified** (any plan): clears *Changes requested* statuses on a new push. - **Reset approvals when the source branch is modified** (Premium): the pull request drops back to zero approvals after any change to the source branch. - **Keep approvals if there is no change to the diff in the pull request** (Premium): keeps approvals when a push does not change the diff — an empty commit, or a rebase that introduces nothing new. Pairing the last two is the usual choice: approvals reset on real changes, but not on a no-op rebase. ## Diagnosing a merge that slipped through 1. **Check the plan.** If the workspace is not on Premium, the check could only warn. 2. **Check the setting.** On Premium, confirm *Prevent a merge with unresolved merge checks* is selected on the restriction that matches the target branch. 3. **Check the target.** A check on `main` does not apply to a pull request into `develop` or `release/2.4`; find which restriction, name, pattern or type actually matched. 4. **Check who approved.** The author's own approval is not counted, so "two approvals" with the author's among them is still one. 5. **Check timing.** Without approval reset, an approval from before a late push still counts. ## Beyond the built-in checks - **Allow automatic merge when builds pass** lets a user select Merge while the build is still running once every other check is met; the merge happens when the build succeeds and is blocked if it fails. - **Custom merge checks** are apps a workspace admin installs and enables; on Premium they can be marked `required` at workspace, project or repository level, and a check required higher up cannot be switched off lower down. Builds that feed these checks are configured elsewhere; for the merge check, all that matters is the status reported on the last commit.
- In Bitbucket Cloud, a reviewer approves and then the author pushes a risky commit. How do you stop the old approval counting?On Premium, select Reset approvals when the source branch is modified, so any push drops the pull request back to zero approvals. Pair it with Keep approvals if there is no change to the diff, so a rebase or empty commit that changes nothing does not force a fresh review.
- What does Allow automatic merge when builds pass change in Bitbucket Cloud?Once every merge check except successful builds is met, a user can select Merge while the build is still running. The merge then completes as soon as the build succeeds, and is blocked if the build fails, so nobody has to wait at the screen.
- In Bitbucket Cloud, can the pull request author's approval help satisfy a two-approval merge check?No. The author can approve their own pull request, but that approval does not count toward the minimum number of approvals, so two approvals from other users are still needed.
- Selecting a minimum-approvals check blocks merges on every Bitbucket plan.
- The pull request author's own approval counts toward the minimum approvals.
- Branch permissions alone can require two approvals before merging.
- Approvals are always cleared automatically when the author pushes new commits.
- A merge check configured on main also applies to pull requests into develop.