How to Dismiss Stale Reviews When New Commits Are Pushed
The dismiss stale reviews option removes existing approvals whenever new commits are pushed, forcing a fresh review of the latest code.
Enable "Dismiss stale pull request approvals when new commits are pushed" so an approval never applies to code the reviewer has not seen.
Steps
- Enable "Require a pull request before merging".
- Enable "Dismiss stale pull request approvals when new commits are pushed".
- New commits then reset the approval count to zero.
Branch protection
Settings
Settings > Branches > main
[x] Require a pull request before merging
[x] Require approvals: 1
[x] Dismiss stale pull request approvals when new commits are pushedGotchas
- A pushed commit that only changes whitespace still dismisses approvals; batch review-ready changes.
- Stale dismissal pairs well with the merge queue, which retests the exact commit that will merge.
Related guides
How to Require Pull Request Reviews With Branch ProtectionRequire a minimum number of approving reviews before merge with a GitHub branch protection rule, and combine…
How to Require Code Owner Reviews With CODEOWNERSAdd a CODEOWNERS file and enable code owner review in branch protection so changes to a path require approval…
How to Configure Bypass Lists for Branch ProtectionGrant specific apps, teams, or roles the ability to bypass a GitHub ruleset or branch protection rule, so aut…