What the queue tests#
A merge queue takes pull requests that have already passed their branch's requirements and tests them again in combination. When a pull request joins, "the changes in the pull request are grouped into a merge_group with the latest version of the base_branch as well as changes from pull requests ahead of it in the queue," and GitHub merges them "once the checks required by the branch protections of base_branch pass." Managing a merge queue A failed check or a conflict removes the pull request, and the queue rebuilds the groups behind it without that change.
That combined run is what the queue adds. It catches the case where two pull requests pass separately and fail together, the same case that requiring up-to-date branches catches, without each author updating and re-running by hand.
Why the checks never arrive#
The queue runs on temporary branches, not on the pull request, and Actions sees it as a different event. GitHub repeats the consequence on the merge queue, events and troubleshooting pages: "If your repository uses GitHub Actions to perform required checks on pull requests in your repository, you need to update the workflows to include the merge_group event as an additional trigger. Otherwise, status checks will not be triggered when you add a pull request to a merge queue. The merge will fail as the required status check will not be reported." Events that trigger workflows
There is no separate list of queue checks to forget. "Merge queue and pull requests checks are coupled and configured under branch protection rules or rulesets," and the queue "will wait for required checks to be reported before it can proceed with merging." It waits until the Status check timeout you configured, after which it assumes the checks failed. For CI outside Actions, the queue pushes branches with the prefix gh-readonly-queue/{base_branch}, and your CI must build those.
A fictional first day with the queue#
Suppose acme/web requires ci-gate on main, produced by .github/workflows/ci.yml with on: pull_request. An administrator enables Require merge queue. The first pull request passes ci-gate on its own commit and joins the queue. The queue creates its temporary branch and waits. No workflow starts, because nothing listens for merge_group. When the timeout passes, the queue removes the pull request. Every pull request after it does the same, and the team's first impression of the queue is that it rejects everything.
The fix is one line per workflow:
name: ci
on:
pull_request:
merge_group:
types: [checks_requested]
GitHub's events reference notes that checks_requested is the only supported activity type, and that naming it "will keep your workflow specific if more activity types are added in the future."
The silent variant: jobs that skip in the queue#
Adding the trigger can leave a quieter problem behind. Workflows often guard jobs with conditions written for pull requests, such as if: github.event_name == 'pull_request' on a job that posts a comment, or a condition that reads the pull request's labels. On a merge_group run those conditions are false, the job is skipped, and "A job that is skipped will report its status as 'Success'" (control jobs with conditions). If that job produces a required check, the queue sees a pass for a test it never ran, and the combined result that justified the queue goes untested.
jobs:
integration:
# Written for pull requests; on merge_group this is false and the job is skipped.
if: contains(github.event.pull_request.labels.*.name, 'run-integration')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- run: make integration
Read every required job's if: with github.event_name == 'merge_group' in mind, and make the queue run the full required set. The skipped job guide shows a gate that turns an unexpected skip into a failure.
Path filters behave differently on this event. The workflow syntax reference documents paths and paths-ignore for push, pull_request and pull_request_target, and documents only branches and branches-ignore for merge_group (workflow syntax). Do not rely on a workflow-level path filter to shape what runs in the queue.
What the queue does not catch#
The queue tests the combination you configured it to test. With Only merge non-failing pull requests turned off, "Pull requests that have failed required checks can be added to a group as long as the last pull request in the group has passed required checks." GitHub describes this as useful when you "have intermittent test failures," which means a pull request whose own run failed can merge inside a passing group. In the REST API this is the difference between the ALLGREEN and HEADGREEN grouping strategies.
It also does not change what your tests cover, and it does not re-review code. A semantic conflict that no test exercises merges through the queue as easily as without it.
What it costs#
Every queued pull request runs CI at least twice, once on its own commit and once in a group, and a failure ahead of it rebuilds the groups behind. The Build concurrency setting caps how many merge_group builds run at once. Jumping a pull request to the front of the queue "will cause a full rebuild of all in-progress pull requests," and GitHub warns that heavy use slows merges.
Availability limits who can use it: "Pull request merge queues are available in any public repository owned by an organization, or in private repositories owned by organizations using GitHub Enterprise Cloud." A queue also "cannot be enabled with branch protection rules that use wildcard characters (*) in the branch name pattern."
A ruleset carries the queue's settings as one rule, with the required checks in their own rule beside it (repository rulesets API):
{
"type": "merge_queue",
"parameters": {
"merge_method": "SQUASH",
"grouping_strategy": "ALLGREEN",
"max_entries_to_build": 5,
"min_entries_to_merge": 1,
"max_entries_to_merge": 5,
"min_entries_to_merge_wait_minutes": 5,
"check_response_timeout_minutes": 60
}
}
The decision#
Before you enable the queue, add merge_group to every workflow that reports a required check, open a test pull request, and confirm that each required check reports on the queue's temporary branch. Audit required jobs for conditions that are false on merge_group. Keep Only merge non-failing pull requests on unless flaky tests are blocking the queue and you accept that a failed pull request can merge inside a passing group.