Auto-merge now requires all PR requirements to be met before enabling (undocumented behavior change, HTTP 422) #190610
-
🏷️ Discussion TypeBug BodySummaryAs of March 25, 2026, we are unable to enable auto-merge on pull requests until all PR requirements (required checks, approvals, etc.) have been fulfilled. Previously, we could enable auto-merge immediately after opening a PR, and it would automatically merge once all requirements were met — which is the documented and expected behavior. This is an undocumented behavior change. The official documentation still states:
And:
This clearly describes the old behavior: enable auto-merge before requirements are met, and it merges when they are met. Error DetailsWhen attempting to enable auto-merge via the GitHub web UI, the following request is made: Request: Response (HTTP 422): {"error":"Failed enabling auto-merge for pull request"}The Ruleset ConfigurationWe are using repository rulesets only (no classic branch protection rules). Here is our complete ruleset configuration for the default branch, retrieved via the API ( {
"name": "default branch (main)",
"target": "branch",
"enforcement": "active",
"conditions": {
"ref_name": {
"include": ["~DEFAULT_BRANCH"],
"exclude": []
}
},
"rules": [
{
"type": "deletion"
},
{
"type": "non_fast_forward"
},
{
"type": "merge_queue",
"parameters": {
"merge_method": "SQUASH",
"max_entries_to_build": 20,
"min_entries_to_merge": 1,
"max_entries_to_merge": 10,
"min_entries_to_merge_wait_minutes": 5,
"grouping_strategy": "ALLGREEN",
"check_response_timeout_minutes": 90
}
},
{
"type": "pull_request",
"parameters": {
"required_approving_review_count": 1,
"dismiss_stale_reviews_on_push": true,
"require_code_owner_review": true,
"require_last_push_approval": true,
"required_review_thread_resolution": true,
"allowed_merge_methods": ["squash"]
}
},
{
"type": "required_status_checks",
"parameters": {
"strict_required_status_checks_policy": false,
"do_not_enforce_on_create": false,
"required_status_checks": [
{ "context": "check-pr-description" },
{ "context": "<ci-system>/<build-job>" }
]
}
}
],
"bypass_actors": [
{ "actor_type": "RepositoryRole", "bypass_mode": "pull_request" }
]
}Key points:
Environment
Expected BehaviorWe should be able to enable auto-merge on a PR that has unmet requirements (pending checks, missing approvals). Once all requirements are satisfied, the PR should be automatically added to the merge queue and merged. This is how it worked until today and what the documentation describes. Actual BehaviorEnabling auto-merge returns HTTP 422 unless all PR requirements are already fulfilled. This defeats the entire purpose of auto-merge — if all requirements are already met, you can just merge directly. Potentially Related
Questions
A support ticket has also been filed for this issue. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 1 reply
-
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
Beta Was this translation helpful? Give feedback.
-
|
I'm seeing this too. This defeats the purpose of auto-merge. Specifically seeing this on repos with merge queue enabled when the approval hasn't happened yet. The error is "Failed enabling auto-merge for pull request". |
Beta Was this translation helpful? Give feedback.
-
|
We are having the same issue, If repo has merge commit disabled, then
even though it was working fine till yesterday. This is when using a GitHub app token, locally with my own user it works fine. Is there some permission change somewhere? |
Beta Was this translation helpful? Give feedback.
-
|
The merge queue is pretty much useless right now. The whole point of using it was to avoid wasting time on manual checks when new stuff is frequently merged into the main branch. Apparently, now I need to find the right moment once it’s green and hit merge, hoping it will succeed. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for reporting. A fix is in the queue. |
Beta Was this translation helpful? Give feedback.
Thanks for reporting. A fix is in the queue.