Description
Summary
Dismiss existing approvals when new commits are pushed to a PR, so every change is approved against its final commits. This makes the main ruleset match what CONTRIBUTING.md already says.
Current state (checked 2026-11-12)
The pull_request rule in main: require PR review and CI has:
| Parameter | Value |
|---|---|
required_approving_review_count |
1 |
dismiss_stale_reviews_on_push |
false |
require_last_push_approval |
false |
require_extra_approval_for_unattributed_changes |
true |
require_code_owner_review |
false |
CONTRIBUTING.md says: "A push after an approval needs a fresh approval." The ruleset doesn't enforce that today, so a PR can be approved, changed, and then merged without anyone reviewing the change.
Proposal
On protect-main (#548):
- Set
dismiss_stale_reviews_on_push: true. - Decide whether to also set
require_last_push_approval: true. This means someone other than the person who pushed last must approve, which blocks "approve, then quietly push again" by a reviewer.- Pros: closes the self-push gap that stale-review dismissal alone leaves open.
- Cons: a maintainer who pushes a small fix to someone else's PR needs a third person to approve.
- Leave
require_code_owner_reviewunchanged. It's tracked separately in Epic 3.
Land this as a change to .github/rulesets/protect-main.json (#547). If that isn't ready, apply it in the UI and record it in the issue.
Update CONTRIBUTING.md to tell authors to use "Re-request review" after pushing to an approved PR.
Acceptance criteria
- Pushing a commit to an approved PR removes the approval, and the PR can't merge until it is approved again
- The decision on
require_last_push_approvalis recorded here, and the ruleset matches it - CONTRIBUTING.md describes what the ruleset enforces
Rollout
Change the rule in evaluate mode first if it lands with other changes. On its own, this is low risk, so it can go straight to active.
Dependencies
- Lands on the combined
protect-mainruleset from Combine the main rulesets into a single protect-main ruleset #548. - Ideally lands as a JSON change through Manage rulesets as code and protect release tags and branches #547.
Part of #546.
Activity