Skip to main content
Version: v2 (current)

Linear Integration with PanDev Metrics

TL;DR. Create a personal API key in Linear, paste it into Settings → Integrations → Linear, pick Polling or Webhook, and name branches with the issue ID — for example feature/ENG-123. The branch name Linear copies for you (username/eng-123-title) works as is. Audience: admin.

Before you begin​

  • PanDev Metrics is up and running (Cloud workspace or on-prem instance)
  • Admin access to your PanDev Metrics tenant
  • A Linear user who can see the teams you want to track. For the Webhook mode — a workspace Admin or Owner

Step 1 — Create a personal API key in Linear​

  1. In Linear open Settings → API → Personal API keys.
  2. Create a key and copy it — it starts with lin_api_.

:::warning Keep the key private The key acts in Linear as the user who created it. Store it in a secrets manager. :::

PanDev Metrics sees the issues that the key's user can see.

Step 2 — Choose how updates arrive​

ModeHow it worksWhen to choose
PollingPanDev Metrics asks Linear for changed issues every 15 minutesAny key works; PanDev Metrics does not have to be reachable from the internet
WebhookPanDev Metrics creates a webhook in Linear, and changes arrive within secondsThe key's user is a workspace Admin or Owner, and Linear can reach your PanDev Metrics server

The mode cannot be changed while the integration is connected: to switch, click Disconnect and connect again.

Step 3 — Connect Linear in PanDev Metrics​

  1. Open Settings → Integrations → Linear.
  2. Turn on Enable integration with Linear.
  3. Select Polling or Webhook.
  4. Fill in the form:
FieldValue
Workspace IDThe workspace name from the Linear address bar: your-team in https://linear.app/your-team. On save, PanDev Metrics reads the actual workspace ID from the key and stores it
Personal API TokenThe lin_api_… key from Step 1
  1. Click Test connection.
  2. After a successful check, click Save.

The first sync loads issues updated during the last year. To stop syncing, click Disconnect on the same screen.

Linear has no time tracking, so PanDev Metrics does not send worklog to Linear.

Step 4 — Name branches with the issue ID​

This is what links Git activity to Linear issues. Put the issue ID — the team key, a dash and the number, as shown in Linear (ENG-123) — anywhere in the branch name. Copy git branch name in Linear (Ctrl/Cmd + Shift + .) already produces a name with the ID.

Branch naming
feature/ENG-123
username/eng-123-add-login-form
ENG-123
BranchResult
feature/ENG-123✅ Linked to issue ENG-123
username/eng-123-add-login-form✅ Linked — the letter case does not matter, text after the ID is allowed after -, _ or /
feature/123❌ Not linked — the team key is missing
feature/ENG123❌ Not linked — the dash is required
feature/ENG-1-ENG-2❌ Not linked when both issues exist — PanDev Metrics cannot choose. If only one of them exists, the branch links to it

Branches that start with dependabot/ or renovate/ are never linked to issues.

PanDev Metrics finds the issue among the Linear issues it has already synced. If the branch appears before the issue is synced, the link is made as soon as the issue arrives.

Without the issue ID, branches will not link to Linear issues

Commits and merge requests on such branches still count toward coding time, but PanDev Metrics cannot attribute them to an issue, so per-issue analytics (Cycle Time, Lead Time, time per issue) stay empty for those issues.

Merge request titles​

A merge request or pull request title in the Conventional Commits form also links to the issue when the ID is the scope: feat(ENG-123): add login form. The title takes priority over the branch name.

Custom attribution rules​

If your branches follow a different pattern, set your own regular expressions in Task Attribution. The first pair of parentheses must capture the whole issue ID — ENG-123, not 123.

Verify​

  1. Open a dashboard with a task-tracker widget and confirm that Linear issues appear and their states match Linear.
  2. Push a branch named feature/ followed by the ID of an existing issue and check that its activity shows up under that issue.

Troubleshooting​

"Linear is connected, but its webhook was not created"

The key's user is not a workspace Admin or Owner, so Linear refused to create the webhook. The integration stays connected, but issue changes do not arrive: in the Webhook mode PanDev Metrics does not poll Linear. Click Disconnect and connect again with Polling, or with a key of an Admin.

"The Linear key is not set — tasks are not being loaded"

The integration was connected without a key of its own. Click Disconnect and connect again with your personal API key.

Connection fails

Check that the key starts with lin_api_ and was not revoked in Settings → API. Create a new key if needed.

A branch does not link to the issue

Check the branch name against the table in Step 4: it must contain the full issue ID with the team key.

Next steps​