View as Markdown

Merge Protection Examples & Patterns

Practical rule recipes for common compliance, quality, and coordination needs.


name: Title Minimum Length
if:
- base = main
success_conditions:
- "#title > 15"

Require Linked Issue for Features

Section titled Require Linked Issue for Features
name: Issue Linked
if:
- label = feature
success_conditions:
- title ~= #[0-9]+
name: 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 Package
name: Changelog Update
if:
- files ~= ^package/
success_conditions:
- files ~= CHANGELOG.md

Require Security Review for Sensitive Paths

Section titled Require Security Review for Sensitive Paths
name: Sensitive Code Review
if:
- files ~= "^(secrets/|encryption/|auth/)"
success_conditions:
- label = security-reviewed
name: Block Temp Bot
if:
- author = temp-bulk-bot
success_conditions:
- label = automation-approved

Feel free to combine & adapt. Keep rules minimal and targeted.

Was this page helpful?