GitHub: "The merge-base changed after approval."
GitHub marks an approval as stale when the merge base of the pull request changes after the review was submitted. With "Dismiss stale pull request approvals when new commits are pushed" on, the review is then dismissed and the pull request needs a new approval, even though the author pushed nothing. The merge base is the closest common ancestor of the target and source branches. The fix is a new approval from someone whose approval counts (GitHub's changelog of June 6, 2023, checked November 22, 2026).
What GitHub says
- The rule: "A pull request approval will be marked as stale when the merge base changes after a review is submitted." When "dismiss stale approvals" is enabled, the review is dismissed and needs a re-approval.
- The other setting: if the branch rules require that every push be reviewed by a second contributor ("Require approval of the most recent reviewable push"), a change in the merge base requires fresh approvals.
- The exception: merge bases changing under a pull request preserve approvals "in most situations where no new changes are introduced". A merge base that moves without bringing in new changes should leave the approval alone.
- GitHub's About protected branches says the same from the other side: approving reviews are dismissed as stale if the merge base introduces new changes after the review, and the pull request cannot be merged until someone approves again. See approval of the most recent push for how the two settings differ.
To see which approvals still stand on a pull request: Pull Request Inbox for GitHub, a plugin for JetBrains IDEs, lists each reviewer's latest decision, leaves a dismissed review out of it, and says in its merge checks when approvals are still required.
What moves the merge base
- Update branch: GitHub lists a click on Update branch among the things that change the diff and dismiss stale approvals. See branch update refused.
- A related pull request merged into the target branch: the same GitHub list names it. A pull request opened from a branch that came out of another pull request's branch is the usual case: when the first one is merged, the second one's base moves.
- You merge or rebase the target branch into your branch: then the newest common commit of the two branches is a newer one, by the definition of a merge base.
- You change the base branch of the pull request: see base branch not changing, which notes that the new base can move the merge base and dismiss approvals.
In a GitHub Community discussion (#58535, labeled Bug, with no reply from GitHub), people also report the message after merging main into a release branch and with no visible change, where git merge-base printed the same commit before and after. Those are users' accounts, not something GitHub documents.
Check that it is the merge base
List the reviews with the commit each was made at. A dismissed approval has the state DISMISSED:
gh api repos/<owner>/<repo>/pulls/<number>/reviews --paginate \
--jq '.[] | {id, user: .user.login, state, commit_id}'
Who dismissed it and with what reason is in the pull request's timeline. In GraphQL, ReviewDismissedEvent has the actor, the dismissalMessage and the previousReviewState (GitHub's ReviewDismissedEvent):
gh api graphql -F owner=<owner> -F name=<repo> -F number=<number> -f query='
query($owner: String!, $name: String!, $number: Int!) {
repository(owner: $owner, name: $name) {
pullRequest(number: $number) {
timelineItems(itemTypes: [REVIEW_DISMISSED_EVENT], first: 50) {
nodes { ... on ReviewDismissedEvent { createdAt dismissalMessage previousReviewState actor { login } } }
}
}
}
}'
To read the merge base GitHub sees now, ask the compare endpoint; run it again after anything that might move it (GitHub's compare two commits):
gh api repos/<owner>/<repo>/compare/<base-branch>...<head-branch> --jq .merge_base_commit.sha
In a local clone, git fetch origin and then git merge-base origin/<base-branch> origin/<head-branch> prints the same commit.
What to do
- Approve again. Anyone whose approval counts for the rule (see approvals that do not count) approves the pull request as it is now. With "Require approval of the most recent reviewable push", the approval must come from someone other than the person who pushed last.
- Do the branch update first. If the branch needs to catch up with the target, do that before asking for approvals, so the merge base does not move after them.
- Check whether it will repeat. If many pull requests merge into the same target while yours waits for review, each of them can move your merge base. That is how the setting is meant to work; the repository's admins choose between it and "Require approval of the most recent reviewable push", where earlier approvals are not dismissed.
- Reported workarounds, not documented by GitHub: in the discussion above, users say closing and reopening the pull request, or changing its base branch and back, restored the approval for them, and others say neither worked. Turning off stale-approval dismissal also gets past it, but it removes the protection for every pull request on the branch, so that is a decision for whoever manages the rules.
- Still blocked after approving: another rule may hold the merge. See why the merge was refused.
In the IDE
Pull Request Inbox for GitHub, a plugin by Lesstep for JetBrains IDEs 2024.1 or later, takes each reviewer's latest approval or request for changes as their decision, as GitHub's Reviewers box does. A dismissed review decides nothing, so after the dismissal the reviewer no longer shows as approved. When GitHub reports that a review is still required, the merge checks say so, with the number of approvals the target branch's rules ask for where the plugin can read it. An approval made at an earlier commit than the head is marked "on an earlier commit". The Update branch action brings the target's new commits in with a merge commit, which is one of the things that can dismiss approvals as above, so use it before the review, not after.
The review inbox, diffs, conversations and merge checks are free. Approving, requesting changes, commenting and merging in the IDE are Pro (US$1.50 a month, with a 30-day trial). The approval is sent for the head commit shown on screen.
Get it on JetBrains Marketplace
GitHub is a trademark of GitHub, Inc.; IntelliJ IDEA is a trademark of JetBrains s.r.o. This page is not affiliated with or endorsed by GitHub, Inc. or JetBrains.
More: Approval of the most recent reviewable push · Review required, approvals that do not count · Base branch not changing · Branch update refused · Changes requested and dismissing a review · Pull Request is not mergeable · 日本語