Skip to main content

Merging a pull request with a merge queue

If a merge queue is required by the branch protection setting for the branch, you can add your pull requests to a merge queue and GitHub Enterprise Cloud will merge the pull requests for you once all required checks have passed.

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."

For information about merge queue, see "Managing a merge queue."

Adding a pull request to a merge queue

  1. On GitHub.com, navigate to the main page of the repository.

  2. Under your repository name, click Pull requests.

    Issues and pull requests tab selection

  3. In the "Pull Requests" list, click the pull request you would like to add to a merge queue.

  4. Click Merge when ready to add the pull request to the merge queue. Alternatively, if you are an administrator, you can:

    • Directly merge the pull request by checking Merge without waiting for requirements to be met (administrators only), if allowed by branch protection settings, and follow the standard flow. Merge queue options

    Tip: You can click Merge when ready whenever you're ready to merge your proposed changes. GitHub Enterprise Cloud will automatically add the pull request to the merge queue once required approval and status checks conditions are met.

  5. Confirm you want to add the pull request to the merge queue by clicking Confirm merge when ready.

Removing a pull request from a merge queue

  1. On GitHub.com, navigate to the main page of the repository.

  2. Under your repository name, click Pull requests.

    Issues and pull requests tab selection

  3. In the "Pull Requests" list, click the pull request you would like to remove from a merge queue.

  4. To remove the pull request from the queue, click Remove from queue. Remove pull request from queue

Alternatively, you can navigate to the merge queue page for the base branch, click ... next to the pull request you want to remove, and select Remove from queue. For information on how to get to the merge queue page for the base branch, see the section below.

Viewing merge queues

You can view the merge queue for a base branch in various places on GitHub Enterprise Cloud.

  • On the Branches page for the repository. We recommend you use this route if you don't have or don't know about a pull request already in a queue, and if you want to see what's in that queue. For more information, see "Viewing branches in your repository."

    View merge queue in Branches page

  • On the Pull requests page of your repository, click next to any pull request in the merge queue.

    View merge queue on Pull requests page

  • On the pull request page when merge queue is required for merging, scroll to the bottom of the timeline and click the merge queue link.

    Merge queue link on pull request

  • The merge queue view shows the pull requests that are currently in the queue, with your pull requests clearly marked.

    Merge queue view

Handling pull requests removed from the merge queue

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 Enterprise Cloud 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.