Merge Protections
Go beyond GitHub's native branch protections and craft custom, advanced rules using Mergify.
Mergify Merge Protections extend GitHub’s native Branch Protections & Rulesets with fine‑grained, dynamic rules.
Merge Protections let you:
-
Enforce advanced success criteria on pull requests (title patterns, labels, CI signals, file changes, authorship, etc.)
-
Express dependencies between pull requests (block merge until others are merged)
-
Schedule when merges may occur (or enforce freezes)
-
Provide consistent, explainable feedback via a single check
Why Use Merge Protections Instead of Only GitHub Rulesets?
Section titled Why Use Merge Protections Instead of Only GitHub Rulesets?| Capability | GitHub Native | Mergify Merge Protections |
|---|---|---|
| Conditional logic (complex AND/OR on PR metadata) | No | Extensive |
| Depends‑On relationships | No | Yes |
| Time / schedule based merge windows | No | Yes |
| Repository freeze (manual or scheduled) | No | Yes |
| Single composite check gate | Partial | Yes |
How They Work
Section titled How They Work-
You enable Merge Protections in the dashboard.
-
A single
Mergify Merge Protectionscheck appears on every PR, or a deployment of the same name if you setreporting_method: deployments. -
Your protection rules determine whether that check passes.
-
Mergify won’t merge a PR until all of its active protection rules succeed, whether the merge comes from the merge queue, Auto-Merge, or the
mergeaction. -
To block merges made outside Mergify too, mark the check as required in GitHub Branch Protection or Rulesets.
Next Steps
Section titled Next StepsThe feature is composed of several building blocks documented in dedicated pages:
- Enabling & Configuration
- Auto-Merge
- Built‑in Protections
- Custom Rules
- Scheduling Freezes
- Examples & Patterns
Was this page helpful?
Thanks for your feedback!