GitSniff LogoGitSniffDocs
Integrations

Linear

Enhance code reviews with ticket context from Linear.

Connect GitSniff to Linear to automatically enrich your code reviews with ticket context, requirements, and acceptance criteria.

What it does

When enabled, GitSniff automatically:

  1. Detects Linear ticket IDs in branch names and PR titles (e.g., SNIFF-123, feature/SNIFF-456-add-login)
  2. Fetches ticket details including title, description, requirements, and acceptance criteria
  3. Enhances AI analysis with ticket context to provide more relevant review feedback

This means the AI understands why the code is being written, not just what it does — leading to better, more contextual reviews.

Setup

1. Generate a Linear API key

  1. Go to Linear Settings > API
  2. Click Create key
  3. Give it a descriptive name (e.g., "GitSniff Integration")
  4. Copy the generated key (starts with lin_api_)

2. Configure in GitSniff

  1. Navigate to Dashboard > Integrations > Linear
  2. Toggle Enable Linear Integration on
  3. Paste your API key and click Validate
  4. Select your default team from the dropdown
  5. Click Save Configuration

How ticket detection works

GitSniff looks for Linear ticket identifiers in:

  • Branch names: feature/SNIFF-123-add-user-auth, SNIFF-456/fix-bug
  • PR titles: [SNIFF-123] Add user authentication, SNIFF-456: Fix login bug

The pattern matches your Linear team key followed by a number (e.g., SNIFF-123, ENG-456).

What context is fetched

When a ticket is detected, GitSniff retrieves:

FieldUsed for
TitleUnderstanding the task purpose
DescriptionFull context and requirements
LabelsCategorization (bug, feature, etc.)
PriorityUrgency assessment
StateCurrent workflow status
AssigneeWho's responsible
ProjectRelated project context

Enhanced review examples

With Linear context, GitSniff can provide feedback like:

"The ticket mentions 'users should be redirected after login' but I don't see redirect logic implemented. Consider adding this to fully address SNIFF-123."

"This PR adds input validation which aligns with the security requirements in SNIFF-456. The implementation looks good."

Configuration options

Organization level

Configure Linear integration for all repositories in your organization:

Dashboard > Integrations > Linear

Team selection

If your Linear workspace has multiple teams, select the default team whose tickets GitSniff should search. Tickets from other teams with matching identifiers will still be detected.

Security

  • API keys are encrypted at rest using AES-256 encryption
  • Keys are only used server-side to fetch ticket data
  • No Linear data is stored permanently — only fetched during analysis

Troubleshooting

Ticket not detected

  • Ensure the ticket ID format matches your Linear team key (e.g., SNIFF-123)
  • Check that the ticket ID is in the branch name or PR title
  • Verify the ticket exists in your selected Linear team

API key validation fails

  • Confirm you're using a valid API key from Linear Settings > API
  • Ensure the key hasn't been revoked
  • Check that the key has access to the teams you need

Context not appearing in reviews

  • Verify Linear integration is enabled in settings
  • Check that a team is selected
  • Ensure the ticket ID in your branch/PR matches an existing ticket