Interview Prep/Git & GitHub/Branch protection, rulesets, CODEOWNERS and review at scale

How do you stop people merging their own PRs with admin rights?

IntermediateProductionBranch protection, rulesets, CODEOWNERS and review at scale
Answer

Enable "do not allow bypassing the above settings" and keep the bypass list empty or limited to a break-glass group. Require approval from someone other than the last pusher. Admin ability to bypass is a policy decision; making it explicit and audited is what satisfies auditors.

All Git & GitHub questions Roadmap: Git & GitHub

More on Branch protection, rulesets, CODEOWNERS and review at scale