When Trunk Flaky Tests detects a flaky test, you can create an automatically generated Linear ticket for your team to pick up and fix the test. Webhook payloads will also contain ticket information when a Jira ticket is created with the integration or when existing tickets are linked.Documentation Index
Fetch the complete documentation index at: https://docs.trunk.io/llms.txt
Use this file to discover all available pages before exploring further.
Connecting to Linear

- Navigate to Settings > Repositories > Ticketing Integration.
- Select Linear as your Ticketing System.
- Add a Linear API key
- Select a Team and Connect to Linear.
API Key permissions
The following project permissions must be granted to your Linear API key so Trunk can read, create, and assign tickets automatically:- Read
- Create issues
Create a new ticket
You can create a new ticket for any test listed in Flaky Tests. There are 2 ways to create a new ticket in the Flaky Tests dashboard:- Click on the options menu for any test case on the repo overview dashboard

- Use the Create ticket button in the top left corner of the test case details page.

Create with Linear
If you are connected to Linear, you can click the Create Linear Ticket button at the end of the modal to automatically create a ticket with the configured team and any field defaults you have set. Note: You can use Flaky Tests webhooks to automate ticket creation, or if you need more control over how tickets are created in Linear. This integration is not required when using webhooks.Field defaults
After selecting a team, you can configure default values that pre-populate whenever a new Linear ticket is created from Flaky Tests:| Field | Description |
|---|---|
| Priority | Default issue priority (Urgent, High, Medium, Low, No priority) |
| Labels | One or more team-level or workspace-level labels to apply |
| Estimate | Default story point estimate (scale matches your team’s estimation type: Fibonacci, T-shirt, linear, or exponential) |
| Project | Default Linear project, filtered to projects accessible by the selected team |
| Assignee | Default assignee, chosen from team members |
Link existing tickets to tests
If you already have a Linear ticket for a test, you can link it directly from the Test Details page without creating a new one. From the UI:- Open the test case details page.
- Click Link Ticket in the top-left corner.
- Enter the Linear ticket URL or ID and click Submit.


