Merge Protection Examples & Patterns
Practical rule recipes for common compliance, quality, and coordination needs.
Title Quality Gate
Section titled Title Quality Gatename: Title Minimum Length
if:
- base = main
success_conditions:
- "#title > 15"
Require Linked Issue for Features
Section titled Require Linked Issue for Featuresname: Issue Linked
if:
- label = feature
success_conditions:
- title ~= #[0-9]+
Disallow WIP in Title
Section titled Disallow WIP in Titlename: No WIP Titles
if:
- title ~= (?i)wip
success_conditions:
- label = allow-wip
Enforce Changelog Entry When Touching Package
Section titled Enforce Changelog Entry When Touching Packagename: Changelog Update
if:
- files ~= ^package/
success_conditions:
- files ~= CHANGELOG.md
Require Security Review for Sensitive Paths
Section titled Require Security Review for Sensitive Pathsname: Sensitive Code Review
if:
- files ~= "^(secrets/|encryption/|auth/)"
success_conditions:
- label = security-reviewed
Author Blocklist
Section titled Author Blocklistname: Block Temp Bot
if:
- author = temp-bulk-bot
success_conditions:
- label = automation-approved
Feel free to combine & adapt. Keep rules minimal and targeted.