> For the complete documentation index, see [llms.txt](https://docs.bugbug.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bugbug.io/integrations/linear.md).

# Linear

Connect BugBug to Linear to create issues from failed test runs and keep links between the issue and its test run.

BugBug's Linear integration lets you turn failed tests into Linear issues. The issue includes the run details and screenshots, so your team doesn't have to copy them by hand.

{% hint style="warning" %}
The Linear integration is available on all paid plans, starting from Core. See [BugBug pricing](https://bugbug.io/pricing/) for details.
{% endhint %}

## Connect Linear with BugBug

1. Go to the **Integrations** page.
2. Find **Linear** on the integrations list.
3. Click **Manage**.
4. Click **Connect**.
5. Authorize BugBug in Linear.
6. After authorization, you return to BugBug.

The connection belongs to the BugBug project. BugBug uses it to list your Linear teams and create issues in the team you choose.

## Create a Linear issue from a failed test

1. Open the failed test run.
2. In the error details of the failed step, click **Create Linear issue**.
3. Select the **Linear Team**.
4. Edit the **Title** if needed. By default, it's `[BugBug] Test run failed - <test name>`.
5. Click **Create**.

If the test already has issues, the window lists the recent ones, so you can check whether the problem is already reported.

You can create one issue per test run. BugBug doesn't create issues automatically for failed scheduled runs.

## What the issue contains

The issue description includes:

* links to the test run (opened at the failed step), the test and the project
* the profile, run method (cloud or local), duration and end time
* the error code, the type of the failed step and the page URL where it failed
* the email of the person who created the issue
* screenshots of the failed step, when available

## Issues related to a test

BugBug shows the Linear issues linked to a test, with the test run each was created for. From there you can also create an issue for the test with **Create issue**.

To remove a link, delete the issue from the list in BugBug. This only removes the link. The issue stays in Linear.

## Disconnect Linear

Go to **Integrations**, find **Linear**, click **Manage** and disconnect the integration.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.bugbug.io/integrations/linear.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
