Skip to content

Commit 67e59d0

Browse files
RobotKrabsCopilotmchammer01
authored
Clarify that Allow auto-merge doesn't apply on merge queue branches (#63826)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>
1 parent a474a0a commit 67e59d0

3 files changed

Lines changed: 9 additions & 1 deletion

File tree

‎content/pull-requests/how-tos/merge-and-close-pull-requests/automatically-merging-a-pull-request.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ contentType: how-tos
2020

2121
Auto-merge merges a pull request automatically after all required reviews and status checks pass. Before you use auto-merge, it must be enabled for the repository. See [AUTOTITLE](/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-auto-merge-for-pull-requests-in-your-repository).
2222

23+
On a branch that requires a merge queue, the repository setting doesn't apply. **Merge when ready** enables auto-merge for a pull request that can't be added to the queue immediately, even if auto-merge isn't allowed for the repository. See [AUTOTITLE](/pull-requests/how-tos/merge-and-close-pull-requests/merging-a-pull-request-with-a-merge-queue).
24+
2325
Auto-merge is disabled if someone without write permissions pushes new changes to the head branch or switches the base branch.
2426

2527
## Enabling auto-merge

‎content/pull-requests/how-tos/merge-and-close-pull-requests/merging-a-pull-request-with-a-merge-queue.md‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ A merge queue helps merge pull requests into a busy protected branch after requi
4040
![Screenshot of the merge queue options for a pull request.](/assets/images/help/pull_requests/merge-queue-options.png)
4141

4242
> [!NOTE]
43-
> You can click **Merge when ready** before all requirements pass. {% data variables.product.github %} adds the pull request to the queue when requirements are met.
43+
> You can click **Merge when ready** before all requirements pass. If the pull request can't be added to the queue immediately, {% data variables.product.github %} enables auto-merge and adds the pull request to the queue when requirements are met, even if **Allow auto-merge** is disabled for the repository.
44+
45+
To cancel this waiting state, click **Disable auto-merge** in the merge box.
4446

4547
1. Confirm you want to add the pull request to the merge queue by clicking **Confirm merge when ready**.
4648

@@ -50,6 +52,8 @@ A merge queue helps merge pull requests into a busy protected branch after requi
5052

5153
With {% data variables.product.prodname_cli %}, use the `gh pr merge` command to add a pull request to a merge queue. If you are targeting a branch that requires a merge queue, this command automatically adds the pull request to the queue if required checks have passed. If required checks have not passed, this command enables auto-merge for the pull request. See [`gh pr merge`](https://cli.github.com/manual/gh_pr_merge) in the {% data variables.product.prodname_cli %} manual.
5254

55+
To add a pull request to the queue only if it can be added immediately, without enabling auto-merge, use the [`enqueuePullRequest`](/graphql/reference/pulls#mutation-enqueuepullrequest) GraphQL mutation. If the pull request can't be added, the mutation returns an error that explains why.
56+
5357
{% endcli %}
5458

5559
## Removing a pull request from a merge queue

‎content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-auto-merge-for-pull-requests-in-your-repository.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ category:
1818

1919
If you allow auto-merge for pull requests in your repository, people with write permissions can configure individual pull requests in the repository to merge automatically when all merge requirements are met. If someone who does not have write permissions pushes changes to a pull request that has auto-merge enabled, auto-merge will be disabled for that pull request. For more information, see [AUTOTITLE](/pull-requests/how-tos/merge-and-close-pull-requests/automatically-merging-a-pull-request).
2020

21+
The **Allow auto-merge** setting doesn't apply to branches that require a merge queue. On those branches, **Merge when ready** can enable auto-merge for a pull request even when this setting is disabled. See [AUTOTITLE](/pull-requests/how-tos/merge-and-close-pull-requests/merging-a-pull-request-with-a-merge-queue).
22+
2123
## Managing auto-merge
2224

2325
{% data reusables.pull_requests.auto-merge-requires-branch-protection %}

0 commit comments

Comments
 (0)