GitHub: the most recent push needs an approval from someone else
When a branch requires pull request reviews, its administrators can also require "approval of the most recent reviewable push": in a branch protection rule, or in the pull request rule of a ruleset. The most recent reviewable push must then be approved by someone other than the person who pushed it, which means at least one other authorized reviewer has approved any changes (GitHub's about protected branches and available rules for rulesets). Approvals given before that push stay on the pull request, so it can look approved and still be blocked (checked October 26, 2026).
GET /repos/OWNER/REPO/rules/branches/BRANCH [{ "type": "pull_request", "parameters": { "require_last_push_approval": true, … } }]
GET /repos/OWNER/REPO/branches/BRANCH/protection { "required_pull_request_reviews": { "require_last_push_approval": true, … } }
GET /repos/OWNER/REPO/pulls/N/reviews [{ "state": "APPROVED", "commit_id": SHA, … }]
What the rule asks
- Someone other than the pusher: the approval has to come after the most recent reviewable push, from someone other than the person who made it. GitHub's example is a "last reviewer" who checks that the latest changes take in the feedback from other reviews and add no new, unreviewed content.
- Earlier approvals stay: with this option, "stale" reviews are not dismissed, and the pull request remains approved as long as someone other than the person who made the most recent changes approves it. A user who has already reviewed the pull request can approve again after the most recent push to meet the requirement.
- Where it is set: in branch protection it is
require_last_push_approvalunderrequired_pull_request_reviews("whether the most recent push must be approved by someone other than the person who pushed it", false by default); in a ruleset it is therequire_last_push_approvalparameter of thepull_requestrule. GraphQL calls itrequireLastPushApproval. "Get rules for a branch" returns all active rules that apply to a branch, at whatever level they are configured; rules in rulesets that only evaluate, or are disabled, are not returned (GitHub's REST API endpoints for rules and for protected branches). - Turning it on by REST:
PATCH /repos/OWNER/REPO/branches/BRANCH/protection/required_pull_request_reviewstakesrequire_last_push_approvalas true or false, with the other review settings. It needs admin or owner permissions to the repository and branch protection already enabled, and answers 422 when validation fails (GitHub's update pull request review protection). - Several rules on one branch: a ruleset has no priority. When several rulesets target the same branch, their rules are aggregated, and where the same rule is defined in different ways, the most restrictive version applies; rulesets also layer with branch protection rules on the same branch. So the pull request needs an approval of the last push as long as any one of them asks for it (GitHub's about rule layering).
To see whether an approval is on the latest push: Pull Request Inbox for GitHub, a plugin for JetBrains IDEs, marks an approval given on an earlier commit, and when the rules require approval of the most recent reviewable push, its merge checks say whether any approval is on the head commit.
How it differs from dismissing stale approvals
- Dismiss stale pull request approvals: GitHub records the state of the diff when a pull request is approved. If the diff changes (a contributor pushes new changes, someone clicks Update branch, or a related pull request is merged into the target branch), the approving review is dismissed as stale, and the pull request cannot be merged until someone approves the work again.
- The most recent push: nothing is dismissed. GitHub describes it as a compromise for complex pull requests that need many reviews, and says that if you are concerned about approved pull requests being "hijacked" with unapproved content, it is safer to dismiss stale reviews.
- With either setting: creating the merge commit yourself and pushing it to the protected branch fails unless its contents exactly match the merge GitHub generates for the pull request, and approving reviews are dismissed as stale if the merge base (the last common ancestor of the topic branch and the base branch) introduces new changes after the review: the pull request then cannot be merged until someone approves again.
When that happens, the pull request's timeline can show the approval as dismissed with this reason, as quoted in a GitHub Community discussion:
The merge-base changed after approval.
GitHub has dismissed approvals on a changed merge base since June 2023, and keeps them in most cases where the new merge base brings in no new changes (changelog, June 6, 2023).
Who can approve
- Not the author: pull request authors cannot approve their own pull requests, and approvals by GitHub Copilot do not count toward the merge requirements (GitHub's approving a pull request with required reviews), though Copilot approvals count once they are turned on (see Copilot reviews). Under this rule, an approval from whoever pushed last does not meet it either.
- A request for changes: under a rule that requires a pull request, a review requesting changes from a collaborator with admin, owner or write access keeps the pull request from merging until the same collaborator approves it. Administrators or people with write access can dismiss a review, with a comment saying why; it then becomes a review comment (GitHub's dismissing a pull request review).
- Who can dismiss reviews: in the same
PATCH,dismissal_restrictionsnames the users, teams and apps that can dismiss pull request reviews; an empty object turns the restriction off. User and team dismissal restrictions are only available for organization-owned repositories, so leave it out for a personal repository (GitHub's update pull request review protection). - A pull request from Copilot: for a pull request that Copilot opened under its own app identity, a ruleset asks for one more approval by default (public preview). If an administrator clears that setting while this rule is on, at least one approval must still cover the last push and come from someone other than Copilot (GitHub's available rules for rulesets). The user who asked Copilot cloud agent for a pull request cannot approve it either (see a pull request from Copilot).
What to do
- The words: a merge refused by this rule answers
New changes require approval from someone other than the last pusher., whichgh pr mergeshows as a GraphQL error (qveys/OpenCodeMobile#5), and a push to the branch gets the same line afterGH006: Protected branch update failed(mozilla/ssl-config-generator#235, xiaotaop/leocad-harmony#22; as quoted in public reports). - Ask for an approval now: someone other than whoever pushed last approves the pull request as it is; a reviewer who approved before the push can simply approve again.
- Someone who can bypass: by default, the restrictions of a branch protection rule do not apply to people with admin permissions to the repository or to custom roles with the "bypass branch protections" permission; the setting "Do not allow bypassing the above settings" applies them to those people too (GitHub's about protected branches). A ruleset can be bypassed only by the roles, teams and apps in its bypass list. Repository admins, organization owners and enterprise owners, the maintain or write role, teams, GitHub Apps and Dependabot can be added to it, and an entry set to "For pull requests only" has to open a pull request, then can choose to bypass the branch protections and merge it (GitHub's creating rulesets for a repository).
- The bypass list of a branch protection rule: in the same
PATCH,bypass_pull_request_allowancestakes the users (logins), teams (slugs) and apps (slugs) allowed to bypass pull request requirements. Passing new arrays of users and teams replaces their previous values (GitHub's update pull request review protection). - With
gh pr merge: before merging, the GitHub CLI looks at the merge state GitHub reports. When it isBLOCKED, it stops withPull request OWNER/REPO#N is not mergeable: the base branch policy prohibits the merge.and suggests--auto(to have the pull request merged after all the requirements have been met) and--admin(to use administrator privileges to merge it immediately).--adminonly skips that check and sends the merge; whether it goes through depends on whether you can bypass the rule, as above (pkg/cmd/pr/merge/merge.go). - See which approvals are on the head: each review in "List reviews for a pull request" carries the
commit_idit was made on; when a review is created through the API without one, it defaults to the most recent commit in the pull request (GitHub's REST API endpoints for pull request reviews). An approval made on an older commit was given before the head moved. - Push, then ask: an approval given before a later push no longer meets the rule, so ask for it once the branch is where you want to merge it.
- Other review rules may hold it too: too few approvals, a code owner's review (see a code owner's review), or unresolved conversations (see the merge waits for conversations).
- Another pull request on the same commit: even after all required reviewers have approved, collaborators cannot merge if another open pull request has a head branch pointing to the same commit with pending or rejected reviews. Someone with write permissions must approve or dismiss the blocking review there first (GitHub's about protected branches).
In IntelliJ IDEA: an approval is not tied to a push
Checked in the IntelliJ IDEA source on October 31, 2026: pullRequestReview.graphql, GHReviewersUtils.kt, GHPRReviewFlowViewModelImpl.kt, GraphQL files, GithubApiRequests.kt.
For each review, the IDE asks GitHub for these fields:
fragment pullRequestReview on PullRequestReview {
__typename
...nodeInfo
url
author {
...actor
}
body
state
createdAt
viewerCanUpdate
}
The commit the review was given on is not among them. Per reviewer it takes the latest approval or request for changes by time, so an approval given before the latest push still counts as an approval in the IDE unless GitHub has dismissed it. How it counts approvals: the merge waits for a team's approval.
None of its 78 GraphQL files asks for requireLastPushApproval, and its list of REST requests has nothing for it.
Its code for re-requesting a review adds everyone who has reviewed, except the author, back to the review requests (how review requests are sent).
GitHub pull requests in IntelliJ IDEA
Pull Request Inbox for GitHub, a plugin by Lesstep for JetBrains IDEs 2024.1 or later, shows a pull request's reviews, checks and conversations next to the diff, and merges it with the methods the target branch allows. When GitHub calls the pull request blocked, its merge checks name what they can read: required checks that have not reported, a review still required, unresolved conversations and unsigned commits the rules hold against it. Its reviewer list marks an approval given on an earlier commit, and when a blocked pull request has approvals and the branch's ruleset or protection requires approval of the most recent reviewable push, the merge checks say so and whether any approval is on the head commit; when the rules cannot be read and every approval was given on an earlier commit, they say it may be what holds the merge back. The review inbox, diffs and conversations are free; approving, commenting, resolving and merging are Pro (US$1.50 a month, with a 30-day trial).
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: "The merge-base changed after approval" · GitHub merge refused (405, 409) · GitHub review refused (422) · GitHub search 422 "Validation Failed" · "Resource not accessible by personal access token" · 401 "Bad credentials" · "Resource protected by organization SAML enforcement" · "API rate limit exceeded" · GitHub diff 406 "too_large", 3,000 files · GitHub line comment 422 "must be part of the diff" · GitHub branch update refused (422) · GitHub pull request not created (422, 403) · GitHub auto-merge refused · GitHub draft, ready for review or close refused · GitHub conversation not resolved · GitHub checks not shown (check runs 403) · GitHub file contents not read · GitHub compare refused (404, 422) · GitHub comment or reply refused (403 locked, archived) · GitHub merge method not allowed (405) · GitHub branch not found (404, 301) · GitHub Enterprise Server not reached · GitHub review request not shown · GitHub pull request list incomplete · GitHub 404 Not Found, renamed repositories (301, 307) · GitHub line comment outdated or not on the diff · GitHub pull requests not updating, notifications late · GitHub suggested change cannot be applied · GitHub required check stuck at "Expected" · GitHub code owner review required · GitHub merge blocked by unresolved conversations · GitHub merge blocked by unsigned commits · GitHub branch that merges through a merge queue · GitHub merge waiting for code scanning results · GitHub merge waiting for code quality results · GitHub merge blocked by a code coverage threshold · GitHub merge blocked by license compliance results · GitHub branch locked or its updates restricted · GitHub branch not deleted after merging · GitHub merge waiting for a team's approval (Required reviewers) · GitHub merge blocked by secret scanning alerts · GitHub stacked pull request not merging · GitHub push blocked by push rules · GitHub merge blocked by commit metadata rules · GitHub force push blocked · GitHub issue not closed by a merged pull request · GitHub pull request not checked out locally · GitHub pull request has merge conflicts · GitHub changes requested and dismissing a review · GitHub co-author not credited for a commit · GitHub dependency review check failed · GitHub Dependabot not rebasing its pull request · GitHub fork not syncing with upstream · GitHub pull request base branch not changing · GitHub pull request not reverting · GitHub pull request template not showing · GitHub pull request labels or assignees not added · GitHub pull request not closing or reopening · GitHub push blocked by push protection · GitHub pull request comment hidden · GitHub pull request blocked until deployments succeed · GitHub team review request replaced by members · GitHub pull request file no longer marked Viewed · GitHub pull request marked merged without being merged · GitHub Copilot review does not count as an approval · GitHub checks not running on a pull request a workflow created · GitHub Update branch button not shown on a pull request · GitHub checks failing on a Dependabot pull request · GitHub checks failing on a pull request from a fork · GitHub checks skipped by [skip ci] in a commit message · GitHub checks gone after the retention period · GitHub code review limits in a public repository · GitHub pull requests turned off or limited in a repository · GitHub checks run on every pull request in a stack · GitHub pull request showing commits already squash merged · GitHub pull request not showing a file diff · GitHub push to a pull request branch from a fork refused · GitHub check cancelled on a pull request · GitHub Rebase and merge not available · GitHub merge commit message not what you expected · GitHub pull request shows every line changed · GitHub API request timed out · GitHub pull request image or document diff not shown · GitHub review request refused (422) · GitHub pull request from Copilot: checks not running, approval not counted · GitHub push refused: GH006 and GH013 on a protected branch · GitHub "At least 1 approving review is required", approvals that do not count · GitHub pull request plugins for IntelliJ IDEA, compared · 日本語