Skip to content

Clear approvals on fresh commits #570

Open

Description

@MushuEE

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_review unchanged. 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_approval is 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

Part of #546.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions