Skip to main content

Managing a merge queue

You can increase development velocity with a merge queue for pull requests in your repository.

People with admin permissions can manage merge queues for pull requests targeting selected branches of a repository.

Note: The pull request merge queue feature is currently in limited public beta and subject to change. Organizations owners can request early access to the beta by joining the waitlist.

About merge queues

A merge queue can increase the rate at which pull requests are merged into a busy target branch while ensuring that all required branch protection checks pass.

Once a pull request has passed all of the required branch protection checks, a user with write access to the repository can add that pull request to a merge queue.

A merge queue may use GitHub Actions. For more information, see "GitHub Actions."

The merge queue creates temporary branches with a special prefix to validate pull request changes. The changes in the pull request are then grouped with the latest version of the base_branch as well as changes ahead of it in the queue. GitHub will merge all these changes into base_branch once the checks required by the branch protections of base_branch pass.

You may need to update your Continuous Integration (CI) configuration to trigger builds on branch names that begin with the special prefix gh-readonly-queue/{base_branch} after the group is created.

For example, with GitHub Actions, a workflow with the following trigger will run each time a pull request that targets the base branch main is queued to merge.

    - gh-readonly-queue/main/**

GitHub merges the pull request according to the merge strategy configured in the branch protection once all required CI checks pass.

Merge queue merging method

For information about merge methods, see "About pull request merges."


  • A merge queue cannot be enabled with branch protection rules that use wildcard characters (*) in the branch name pattern.

After grouping a pull request with the latest version of the target branch and changes ahead of it in the queue, if there are failed required status checks or conflicts with the base branch, GitHub will remove the pull request from the queue. The pull request timeline will display the reason why the pull request was removed from the queue.

Managing a merge queue

Repository administrators can require a merge by enabling the branch protection setting "Require merge queue" in the protection rules for the base branch.

For information about how to enable the merge queue protection setting, see "Managing a branch protection rule."