This guide walks you through setting up Trunk Merge Queue for your repository. The setup process involves installing the GitHub App, creating a queue, and configuring branch protection rules to allow the merge queue to function properly.Documentation Index
Fetch the complete documentation index at: https://trunk-4cab4936-mintlify-migrate-docs-changes-1778007735.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before you begin, make sure you have:- Admin access to your GitHub organization
- A repository you want to protect with Merge Queue
Install the Trunk GitHub App
- Sign in to app.trunk.io and navigate to the Merge Queue tab. (First-time users will create an organization before accessing Merge Queue.)
- Click the Create New Queue button at the top right corner of the window.
The Trunk GitHub App is required for Merge Queue to function. It grants Trunk Merge Queue the necessary permissions to create test branches, read CI results, and merge PRs in your repository. View detailed permissions and what Trunk uses them for.If the GitHub App is already installed, step 3 will be skipped automatically.
- If the Trunk GitHub App is not already installed, you’ll be prompted to install it.
- Click Install GitHub App and follow the installation flow:
- Select whether to install on all repositories or only specific ones
- Review and approve the required permissions
- Complete the installation
- After the GitHub App installation is complete, you’ll be returned to the Trunk dashboard.
- Click Install GitHub App and follow the installation flow:
Create your first queue
- In the Merge Queue tab, click the Create New Queue button at the top right corner of the window.
- Select a repository from the dropdown and enter the target branch to merge into. Click Create Queue.
What you just did
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.