Skip to main content

LINEAR WITH SWAMP

Swamp works with Linear through behaviors. Each behavior holds one Linear personal API key, read from a vault, and its methods call the Linear API. When a method lists teams, creates an issue or gathers a day's activity, Swamp records what it read or wrote as data in the repository. You can query that data, pass it into later workflow steps and audit it after the run.

Get started

curl -fsSL https://swamp-club.com/install.sh | sh
swamp repo init
swamp extension pull @hivemq/linear
swamp extension pull @mgreten/linear
swamp extension pull @mgreten/linear-activity

Four extensions in the registry provide Linear behavior types:

  • @hivemq/linear creates issues and lists teams, projects and workflow states.
  • @mgreten/linear covers the same ground and adds issue updates, verified deletion, epics with sub-issues, labels by name, comments, documents and issues assigned to the key's own user.
  • @mgreten/linear-activity records a user's daily Linear activity for standups and end-of-day reports. It doesn't change anything in Linear.
  • @mgreten/graphite-linear-sync compares GitHub and Graphite pull request stacks with the Linear issues they reference, then moves those issues to the matching state.

To start, the getting started tutorial uses @hivemq/linear. You pull the extension, keep the API key in a vault, record your teams and workflow states, and file a first issue. The other pages cover specific tasks. One files a parent issue and its sub-issues in a single run (create an epic with sub-issues). One brings issue states back in line with merged and open pull requests (sync issue states with Graphite PR stacks). A third records a day's work before a standup (collect daily activity for standups). The extensions reference lists every global argument, method and resource.

All four types require an apiKey global argument. In every example in these pages, the key lives in a vault named linear under the key api-key. Behaviors refer to it as ${{ vault.get('linear', 'api-key') }}, so the key never appears in a definition file and Swamp redacts it from output. Understanding Linear automation in Swamp covers this choice. It also covers how to choose between the extensions and which methods change Linear and which only read from it.

Linear documentation