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-activityFour 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
Getting started with Linear in Swamp
Pull the @hivemq/linear extension, create a Linear behavior that reads its API key from a vault, list your teams and file a first issue from the Swamp CLI.
Tutorials →Create a Linear epic with child sub-issues
Use the createEpic method of @mgreten/linear to file a parent issue and several linked sub-issues in one run, passing parent and children as JSON inputs.
How-to Guides →Sync Linear issue states with Graphite PR stacks
Scan open GitHub PRs for Linear ticket references with @mgreten/graphite-linear-sync, review the dry run, then transition Linear issues to match PR states.
How-to Guides →Collect daily Linear activity for a standup report
Configure @mgreten/linear-activity with team keys and run daily_activity to record completed, in-review, created and in-flight issues and comments for a date.
How-to Guides →Linear extensions
Every Swamp extension for Linear: behavior types, global arguments, methods, vault configuration and the data each one writes, read from the registry.
Reference →Understanding Linear automation in Swamp
How the Linear extensions map onto Swamp behaviors, vaults, data and workflows, and which choices a team makes about API keys, defaults and write access.
Explanation →