Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions merge-queue/administration/advanced-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,31 @@ The `Running` state is the default state of your merge queue, and will be the no

***

## Multiple queues per repository

You can create multiple merge queues within a single repository, with each queue targeting a different branch. This is useful for teams that maintain separate branches for different environments (e.g., `main`, `staging`, `release/v2`).

A branch can only be associated with one queue. Attempting to create a second queue against the same branch returns the error `A merge queue already exists for branch "<branch>" in this repository`.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style nit: "create a second queue against the same branch" — "against" reads a bit oddly here. "for the same branch" or "targeting the same branch" matches the language used in the section's first paragraph ("each queue targeting a different branch").

Suggested change
A branch can only be associated with one queue. Attempting to create a second queue against the same branch returns the error `A merge queue already exists for branch "<branch>" in this repository`.
A branch can only be associated with one queue. Attempting to create a second queue targeting the same branch returns the error `A merge queue already exists for branch "<branch>" in this repository`.


Each queue operates independently. PRs submitted to one queue don't interact with PRs in another queue for the same repo, and every queue has its own settings, including merge method, required statuses, batching, and concurrency.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: repo is informal compared to the rest of this page (and section heading), which uses repository. Also, the qualifier is a bit redundant since the whole section is scoped to a single repository — consider trimming.

Suggested change
Each queue operates independently. PRs submitted to one queue don't interact with PRs in another queue for the same repo, and every queue has its own settings, including merge method, required statuses, batching, and concurrency.
Each queue operates independently. PRs submitted to one queue don't interact with PRs in another queue, and every queue has its own settings, including merge method, required statuses, batching, and concurrency.


### Creating additional queues

1. Navigate to **Merge Queue** and click **New Queue** at the top right
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Button label inconsistency. The other Merge Queue docs refer to this button as Create New Queue (e.g., install-and-create-your-queue.md lines 27 and 44, getting-started/README.md line 20), but here and in common-problems.md line 92 it's called New Queue. Pick one and use it in all three places so users searching the UI for the exact label always find it. If the actual button label is "New Queue" today, the older pages need a follow-up update; if it's "Create New Queue", these new mentions should match.

Suggested change
1. Navigate to **Merge Queue** and click **New Queue** at the top right
1. Navigate to **Merge Queue** and click **Create New Queue** at the top right

Fix this →

2. Select the same repository and enter a different target branch
3. Click **Create Queue**

### Navigating between queues

The Merge Queue dashboard groups queues by repository:

* **Single-queue repos**: The repository row is itself a link that goes directly to the queue.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style nit: "is itself a link that goes directly to the queue" is a bit roundabout. Tightening it improves parallelism with the Multi-queue repos bullet below.

Suggested change
* **Single-queue repos**: The repository row is itself a link that goes directly to the queue.
* **Single-queue repos**: The repository row links directly to the queue.

* **Multi-queue repos**: The repository row expands inline to list each queue with its target branch label. Click any queue to open it.

In the Settings page, when a repository has more than one queue, a **Merge Queues** selector appears so you can switch between queues. The currently selected branch is shown next to the **Merge Queue Settings** heading.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Grammar nit: "In the Settings page" reads a bit awkwardly — the conventional preposition is "On the Settings page" (or just "In Settings"). Same suggestion lets you tighten the sentence too.

Suggested change
In the Settings page, when a repository has more than one queue, a **Merge Queues** selector appears so you can switch between queues. The currently selected branch is shown next to the **Merge Queue Settings** heading.
On the Settings page, when a repository has more than one queue, a **Merge Queues** selector appears so you can switch between queues. The currently selected branch is shown next to the **Merge Queue Settings** heading.


***

## Merge Queue mode

> Merge Queues operate in one of two modes, **Single** (default) or [**Parallel**](../optimizations/parallel-queues/)**.**
Expand Down
4 changes: 4 additions & 0 deletions merge-queue/getting-started/install-and-create-your-queue.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ If the GitHub App is already installed, step 3 will be skipped automatically.

You've installed the Trunk GitHub App on your organization and created your first merge queue for the specified branch (`main` in the example above). Trunk is now connected to your repository and ready to be configured. Your queue won't start processing pull requests until you complete the branch protection setup in the next step.

{% hint style="info" %}
**Need multiple queues?** You can create additional queues for the same repository targeting different branches (e.g., `staging`, `release/v2`). Each queue operates independently with its own settings. See [Multiple queues per repository](../administration/advanced-settings.md#multiple-queues-per-repository) for details.
{% endhint %}

### Next steps

→ [**Configure branch protection**](configure-branch-protection.md) - Set up GitHub rules so Trunk can safely manage your merges
Expand Down
6 changes: 4 additions & 2 deletions merge-queue/reference/common-problems.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,11 @@ Features like Optimistic Merging and Batching are validation and testing strateg

<summary>Can I create multiple merge queues for a single repository?</summary>

Currently, Trunk Merge Queue supports one merge queue per repository. If this is critical for your use case, [talk to us](../../setup-and-administration/support.md) and we'll consider adding support for your use case.
Yes! You can create multiple queues within a single repository, with each queue targeting a different branch (e.g., `main`, `staging`, `release/v2`). Each queue operates independently with its own settings, required statuses, and merge behavior. A branch can only be associated with one queue.

For validating significant changes to your CI process or queue configuration without impacting your primary workflow, the recommended approach is to use a fork of your repository. You can set up and test a separate merge queue on the fork to make sure your changes work as expected before applying them to your primary repository.
To create an additional queue, click **New Queue** from the Merge Queue dashboard and select the same repository with a different target branch. See [Multiple queues per repository](../administration/advanced-settings.md#multiple-queues-per-repository) for details.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same button-label inconsistency I flagged in advanced-settings.md line 118 — the rest of the docs (e.g., install-and-create-your-queue.md) call this Create New Queue. Should match whichever label is correct in the live UI.

Suggested change
To create an additional queue, click **New Queue** from the Merge Queue dashboard and select the same repository with a different target branch. See [Multiple queues per repository](../administration/advanced-settings.md#multiple-queues-per-repository) for details.
To create an additional queue, click **Create New Queue** from the Merge Queue dashboard and select the same repository with a different target branch. See [Multiple queues per repository](../administration/advanced-settings.md#multiple-queues-per-repository) for details.


For validating significant changes to your CI process or queue configuration without impacting your primary workflow, you can use a fork of your repository. Set up and test a separate merge queue on the fork to make sure your changes work as expected before applying them to your primary repository.

</details>

Expand Down
Loading