Merge Protection Examples & Patterns
Practical rule recipes for common compliance, quality, and coordination needs.
Each recipe below is one item of the merge_protections list in your
configuration file. See Custom Rules for the
full rule structure.
Title quality gate
Section titled Title quality gatename: Title Minimum Lengthif: - base = mainsuccess_conditions: - "#title > 15"Require linked issue for features
Section titled Require linked issue for featuresname: Issue Linkedif: - label = featuresuccess_conditions: - "title ~= #[0-9]+"Disallow WIP in title
Section titled Disallow WIP in titlename: No WIP Titlesif: - title ~= (?i)wipsuccess_conditions: - label = allow-wipEnforce changelog entry when touching package
Section titled Enforce changelog entry when touching packagename: Changelog Updateif: - files ~= ^package/success_conditions: - files ~= CHANGELOG.mdRequire security review for sensitive paths
Section titled Require security review for sensitive pathsname: Sensitive Code Reviewif: - files ~= ^(secrets/|encryption/|auth/)success_conditions: - label = security-reviewedAuthor blocklist
Section titled Author blocklistname: Block Temp Botif: - author = temp-bulk-botsuccess_conditions: - label = automation-approvedFeel free to combine & adapt. Keep rules minimal and targeted.
Was this page helpful?
Thanks for your feedback!