On an eventNeeds a repository

Turn a Linear label into a PR

A PR linked to the issue

Label a Linear issue and an agent picks it up, does the work in the Project's repository and opens a pull request.

View .md

Best for

  • Teams that triage in Linear
  • Small, well-described issues

Uses

  • A Linear connection
  • A connected GitHub repository
  • An automation with a Linear trigger

Automation · Linear: agent label

POST /o/{org}/p/{project}/automations/{automation}/triggers
promptDo the work this Linear issue describes and open a pull request that links back to it. Ask on the issue if the description is not enough.
{
  "kind": "linear",
  "events": ["linear.issue.labeled"],
  "config": {
    "labels": ["agent"]
  }
}
Fig. The automation: its prompt, and the trigger that starts a run. Field names are the API's.

Watch it work, then read what comes back

GET /o/{org}/sessions/{session}/events
event: thinkingENG-42 asks for a dark mode toggle in settings.
event: tool_useedit · settings/Appearance.tsx
event: tool_resultbuild passed
event: messageOpened a pull request that links ENG-42.
Fig. The live stream while it works. Event names are the stream's.
GET /o/{org}/sessions/{session}
status
completed
branch
rush/eng-42-dark-mode
pr_url
github.com/acme/web/pull/…
Fig. The session when it ends. Field names are the API's.

Steps

  1. 01

    Connect Linear

    Sign in to Linear once from Settings, Integrations.

  2. 02

    Add the trigger

    A linear trigger on linear.issue.labeled with the labels that should fire it. Changes made by an app integration never fire.

  3. 03

    Label an issue

    The run starts with the issue as its context and opens a pull request on its own branch.

In the API and the docs