> ## Documentation Index
> Fetch the complete documentation index at: https://www.greptile.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Linear Integration

> Connect Linear so Greptile reviews pull requests against related issues

When you connect Linear, Greptile finds Linear issues related to your pull requests and reviews the code against the requirements.

<Note>
  **Prerequisites:** Authorizing the connection to Linear requires admin access. Once authorized, the context applies to every repository in the organization.
</Note>

## What Greptile Does with Your Issues

* **Greptile finds the issue.** It reads identifiers and links from the pull request title, description, and branch name, and it can search Linear for related work.
* **Greptile reviews the code against the issue.** The description, comments, and acceptance criteria become review context, so Greptile can point out where a change does not do what the issue asked for.
* **Greptile answers follow-up questions.** Ask about a Linear issue in a reply to a Greptile comment, and Greptile looks it up.
* **Greptile shows what it read.** Every issue it opened is linked in the review.

## Connect Linear

<Steps>
  <Step title="Open Integrations">
    Go to [Memory → Integrations](https://app.greptile.com/-/custom-context/integrations) in the Greptile dashboard.
  </Step>

  <Step title="Add Linear">
    Click **Add new data source** and select **Linear**.
  </Step>

  <Step title="Authorize Greptile">
    Linear asks you to grant Greptile read access to your workspace. Approve the request, and Linear returns you to the Integrations page.
  </Step>

  <Step title="Confirm the connection">
    Linear now appears in your list of connected data sources. Greptile uses issue context on the next review.
  </Step>
</Steps>

## Where Issues Appear in Reviews

A comment that depends on an issue ends with a **Source Used** line linking to it, and the review summary lists everything Greptile read under **Context used**.

Greptile cites only the issues it actually opened, and it says when an issue came from its own search rather than from your pull request.

## What Greptile Can Read

The connection is read-only, so Greptile never writes to Linear. Greptile reads Linear as the account that authorized the connection, which means it sees any issue that account can see, narrowed to the Linear teams you select.

## Limit Greptile to Specific Linear Teams

By default, Greptile can read your entire Linear workspace. To narrow that, click the edit icon on the **Linear** row to open **Configure Linear**, then select the Linear teams whose issues Greptile may read. If you select none, the whole workspace stays available.

The same dialog has an **Instructions** field for telling Greptile how your organization uses Linear, for example that acceptance criteria live in the issue description.

## Manage the Connection

Any member of your organization can see the connected data sources under [Memory → Integrations](https://app.greptile.com/-/custom-context/integrations), and admins can add or remove them there.

To turn the integration off, click the disconnect icon on the **Linear** row and confirm. Greptile deletes the stored credentials, and reviews continue without issue context.

## Next Steps

<CardGroup cols={2}>
  <Card title="Jira Integration" icon="list-check" href="/docs/jira-integration">
    Connect Jira to give reviews the same kind of ticket context.
  </Card>

  <Card title="Common Issues" icon="wrench" href="/docs/troubleshooting/common-issues">
    Troubleshoot reviews that are not picking up issue context.
  </Card>
</CardGroup>
