Skip to main content

Submitting and cancelling pull requests

Install the Trunk for GitHub Chrome Extension to submit and cancel PRs directly from GitHub without leaving your pull request page.
Image

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 Merge Queue[your repository]Settings.
  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 dequeues it from the merge queue. You can also use /trunk cancel, the Web App, or the CLI to cancel an in-progress PR.

Pull request processing

Once a PR is submitted to the merge queue it goes through several states. First, it starts as Queued until all of the required conditions to submit it are met. Once ready, the PR moves to the Pending state, waiting for a Merge Queue to pick it up, and then enters the Testing state. Once the tests pass the PR may still need to wait for upstream PRs. Once any upstream PRs are complete the PR will be merged and then removed from the Merge Queue. If a PR fails or is canceled then it will go to the failed or canceled state.

Pull request states

A PR’s lifecycle in the Merge Queue goes through the following states: