Auto-Merge
Automatically merge or queue pull requests when all merge protection conditions pass.
When auto_merge is enabled in your merge_protections_settings, Mergify
automatically acts on pull requests as soon as all applicable merge
protection success_conditions are satisfied.
The exact behavior depends on whether the merge queue is enabled for the repository:
auto_merge | Merge queue enabled? | Behavior |
|---|---|---|
true | Yes | PR is automatically added to the merge queue |
true | No | PR is automatically merged |
false (default) | — | No automatic action |
Configuration
Section titled ConfigurationAdd auto_merge: true to the merge_protections_settings section of your
Mergify configuration file:
merge_protections_settings: auto_merge: true
merge_protections: - name: require-review-and-ci if: - base = main success_conditions: - "#approved-reviews-by >= 1" - check-success = ciWith this configuration, any pull request targeting main that has at least
one approved review and a passing ci check is automatically merged (or
queued if the merge queue is enabled).
Constraints
Section titled Constraints-
Global setting —
auto_mergeapplies to all pull requests in the repository. You cannot enable it selectively for specific queue rules. -
Requires merge protections —
auto_mergeonly takes effect when at least one merge protection rule is configured. Without protection rules there are nosuccess_conditionsto evaluate.
Was this page helpful?
Thanks for your feedback!