diff --git a/merge-queue/using-the-queue/reference.mdx b/merge-queue/using-the-queue/reference.mdx index 23d7237..87e656d 100644 --- a/merge-queue/using-the-queue/reference.mdx +++ b/merge-queue/using-the-queue/reference.mdx @@ -16,8 +16,30 @@ trunk login trunk merge ``` +* Applying a configured **enqueue label** to the pull request on GitHub (see [Enqueueing by label](#enqueueing-by-label)). + Admins can also use [`/trunk merge --force`](./force-merge) to push a PR through the queue when branch protection isn't satisfied. +## Enqueueing by label + +You can configure a GitHub label that, when applied to a pull request, automatically submits it to the merge queue. This lets teams integrate Trunk Merge Queue into existing label-based GitHub workflows and automations without requiring a comment or CLI command. + +### Configure the enqueue label + +1. Navigate to **Settings** > **Repositories** > **Merge Queue**. +2. Under **Enqueue by label**, enter the name of the GitHub label you want to use (for example, `merge-queue` or `ready-to-merge`). +3. Save the setting. + +Once configured, applying that label to any open pull request in the repository will enqueue it automatically. Trunk removes the label from the PR once the queue picks it up. + + +The enqueue label only triggers enqueueing when applied to an open PR that is eligible for the queue. PRs that are draft, failing required checks, or otherwise ineligible will not be enqueued. + + +### Removing from the queue + +Removing the configured label from a PR does **not** cancel it from the queue. Use `/trunk cancel`, the Web App, or the CLI to cancel an in-progress PR. + We offer similar commands for cancellation. * Posting a GitHub comment `/trunk cancel` on a pull request.