Skip to main content

Documentation Index

Fetch the complete documentation index at: https://trunk-4cab4936-mintlify-migrate-docs-changes-1778515731.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

If using Draft PR mode (Default)

Your existing pull request-triggered CI workflows will automatically run when Trunk creates draft pull requests to test changes. No additional configuration is required. Trunk will wait for the same required status checks configured in your branch protection rules (either via Classic rules or Rulesets) before merging.
You can also configure required status checks directly in the Trunk UI instead of relying on GitHub branch protection. See Required Status Checks in the settings documentation.
See GitHub’s documentation for configuring required status checks: You’re done! Skip to the Verification section below.

If using Push-Triggered mode

You need to complete two additional steps: Step 1: Configure Push-Triggered CI Workflows Set up your CI provider to run status checks whenever Trunk pushes to trunk-merge/* branches. Example for GitHub Actions:
name: Merge Queue Tests
run-name: Merge Queue Checks for ${{ github.ref_name }}

# Trigger when Trunk Merge Queue tests a pull request
on:
  push:
    branches:
      - trunk-merge/**

jobs:
  unit_tests:
    runs-on: ubuntu-latest
    name: Unit Tests
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      
      - name: Run tests
        run: npm test  # Your actual test commands

  integration_tests:
    runs-on: ubuntu-latest
    name: Integration Tests
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      
      - name: Run integration tests
        run: npm run test:integration  # Your actual test commands
For other CI providers: Configure workflows triggered by pushes to branches matching trunk-merge/**. Step 2: Define Required Status Checks in .trunk/trunk.yaml Create or edit your trunk.yaml file in a directory named .trunk at the root of your repository (so, .trunk/trunk.yaml) to specify which status checks Trunk should wait for before merging:
version: 0.1
merge:
  required_statuses:
    - Unit Tests
    - Integration Tests
Important: The status check names in .trunk/trunk.yaml must exactly match the job names from your CI workflows.

Next Steps

Test your setup - Verify everything is configured correctly before using Merge Queue in production. Having trouble? See our Troubleshooting guide for common installation issues.