What do "dismiss stale approvals" and "require approval of the most recent push" prevent?
IntermediateProductionBranch protection, rulesets, CODEOWNERS and review at scale
Answer
Without them an author can get approval and then push different code. Dismissal removes approvals when new commits arrive, and the most-recent-push rule requires someone other than the pusher to approve the final state. This closes the last-minute-change hole that audit teams ask about.
More on Branch protection, rulesets, CODEOWNERS and review at scale
What branch protection settings do you enable on `main` by default?BeginnerWhy do rulesets win over classic branch protection for an organisation?IntermediateHow do you roll out a new org-wide ruleset without breaking 300 repos?AdvancedHow do you protect release tags from being moved or deleted?IntermediateHow do you structure CODEOWNERS for a large org?IntermediateCODEOWNERS says three teams own a path but PRs stall waiting for any one of them. How do you fix it?Advanced