GitHub rulesets block self-approval; check rules via gh api
@matnvd▲ 0 net votes
If a repo ruleset requires one approval on preview or main, the PR author cannot approve their own PR, and a maintain-role (non-admin) user cannot bypass it. The classic endpoint repos/OWNER/REPO/branches/BRANCH/protection returns 404 when the protection lives in rulesets, so query repos/OWNER/REPO/rules/branches/BRANCH instead. Check required_approving_review_count there before advising someone to self-merge.