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

# Linear

> Connect your Linear workspace to automate issue tracking with your pull requests

export const ThemeImage = ({src, alt}) => {
  let lightSrc, darkSrc;
  if (src.includes("-light.")) {
    lightSrc = src;
    darkSrc = src.replace("-light.", "-dark.");
  } else if (src.includes("-dark.")) {
    darkSrc = src;
    lightSrc = src.replace("-dark.", "-light.");
  } else {
    lightSrc = src;
    darkSrc = src;
  }
  return <span>
      <img className="block dark:hidden rounded-lg border" src={lightSrc} alt={alt} />
      <img className="hidden dark:block rounded-lg border" src={darkSrc} alt={alt} />
    </span>;
};

## Overview

The Gitar Linear Integration connects your Linear workspace with your pull requests for automated issue management. Gitar can detect relevant issues, update their status, and add comments — keeping your engineering workflow and code reviews in sync.

<CardGroup cols={2}>
  <Card title="Auto-Link Issues" icon="link">
    Detect and link Linear issues to PRs even when ticket references are missing
  </Card>

  <Card title="Post Merge Summaries" icon="file-text">
    Add implementation summaries to linked issues when PRs merge
  </Card>

  <Card title="Suggest Reviewers" icon="users">
    Auto-assign reviewers based on Linear issue watchers
  </Card>

  <Card title="Create Follow-ups" icon="plus-circle">
    Create follow-up issues for unresolved comments and TODOs
  </Card>
</CardGroup>

## Get Started

Follow these steps to connect your Linear workspace using OAuth.

<Steps>
  <Step title="Access Gitar Integrations">
    Navigate to your organization's settings in the Gitar dashboard to begin the integration:

    1. Navigate to your organization's **Settings** in the Gitar dashboard
    2. Go to the **Integrations** section
    3. Find the **Linear** card and click **Connect**
  </Step>

  <Step title="Authorize the Linear OAuth App">
    You'll be redirected to Linear's authorization page:

    1. Select the workspace you want to connect
    2. Review the permissions requested
    3. Click **Approve** to authorize Gitar
  </Step>

  <Step title="Connection Confirmed">
    Once authorized, you'll see a confirmation that your Linear integration is connected.

    <ThemeImage src="/assets/images/linear-light.png" alt="Linear integration" />
  </Step>
</Steps>

## Built-in Rules

Gitar provides five built-in rules for the Linear integration. These are available in the rule catalog once the integration is connected.

| Rule                                  | Description                                                                                    |
| ------------------------------------- | ---------------------------------------------------------------------------------------------- |
| **Linear Auto-Linking**               | Find and attach relevant Linear issues to PRs that don't have linked tickets                   |
| **Summary of change to Linear issue** | Add implementation summaries to linked Linear issues when merged                               |
| **Multi-Issue Relationship Linking**  | Create relationships between multiple Linear issues attached to the same PR                    |
| **Reviewer Assignment from Issue**    | Auto-assign reviewers based on Linear issue watchers and stakeholders                          |
| **Unaddressed Items Follow-up**       | Create follow-up Linear issues for unresolved review comments and new TODOs when changes merge |

<ThemeImage src="/assets/images/linear-rules-light.png" alt="Linear rules in catalog" />

## Enable Linear Features

Once your Linear integration is connected, you can enable specific features through your repository's Rules page:

1. Navigate to your repository in the Gitar dashboard
2. Go to **Rules** in the sidebar
3. Find the Linear-related rules and toggle them on

## Using Linear with Custom Rules

You can write custom repository rules that leverage the Linear integration. To grant a custom rule access to Linear, add `integrations: ["linear"]` to the rule's frontmatter. See [Rules](/features/rules) for more details on creating custom rules.

## Frequently Asked Questions

### What permissions does Gitar need?

Gitar requests read and write access to issues in your Linear workspace. This allows Gitar to read issue details, create new issues, and add comments on your behalf.

### Can I use Linear alongside Jira?

Yes, but only one ticket tracker integration can be active per organization. If you need to switch, disconnect the current integration before connecting the other.
