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).
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.
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, in public preview, 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).
What to do
- 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.
- 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).
In IntelliJ IDEA: an approval is not tied to a push
How the GitHub support built into IntelliJ IDEA deals with approvals after a new push, in its source (checked October 31, 2026; IntelliJ IDEA: pullRequestReview.graphql, GHReviewersUtils.kt, GHPRReviewFlowViewModelImpl.kt, GraphQL files, GithubApiRequests.kt):
- Not the rule: none of its 78 GraphQL files asks for
requireLastPushApproval, and its list of REST requests has nothing for it. - Reviews without their commit: for each review it asks for the author, text, state and time, but not the commit the review was given on. 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.
- Asking again: 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).
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: 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 · 日本語