Skip to content

feat: Add Linear action item syncing for incidents#139

Open
spalmurray wants to merge 17 commits intomainfrom
spalmurray/linear-action-items
Open

feat: Add Linear action item syncing for incidents#139
spalmurray wants to merge 17 commits intomainfrom
spalmurray/linear-action-items

Conversation

@spalmurray
Copy link
Copy Markdown
Contributor

@spalmurray spalmurray commented Apr 1, 2026

Adds backend support for tracking Linear action items on incidents. Users create issues in Linear and attach them to the Firetower incident URL. Firetower syncs these issues into a local ActionItem model with a throttled sync (same pattern as Slack participant sync). Details:

  • New ActionItem model linked to incidents via Linear issue attachments
  • LinearService that queries Linear's GraphQL API for issues attached to a given Firetower URL
  • Throttled sync on the action items list endpoint, with a force sync endpoint
  • Django admin action to sync action items (matches existing Slack participant sync pattern)
  • Auto-creates users for Linear assignees who haven't logged into Firetower yet
  • Extracts parse_incident_id helper to deduplicate incident ID parsing across views
  • New firetower_base_url config to ensure attachment URL matching is specific enough to avoid cross-environment collisions (e.g. TESTINC-2000 vs INC-2000)

Before merge

  • Add [linear] section with api_key and action_item_sync_throttle_seconds to production config
  • Add [linear] section with empty api_key to config.ci.toml
  • Ensure firetower_base_url is set correctly in production config (moved to top-level)
  • Run migration 0015 (adds ActionItem model and action_items_last_synced_at to Incident)
  • Obtain Linear workspace API key with attachment/issue read permissions
  • Test sync in test env with a real Linear-attached incident

@spalmurray spalmurray marked this pull request as ready for review April 1, 2026 20:44
@spalmurray spalmurray requested a review from a team as a code owner April 1, 2026 20:44
@spalmurray spalmurray force-pushed the spalmurray/linear-action-items branch from 81fc279 to a89135f Compare April 7, 2026 17:28
@spalmurray spalmurray force-pushed the spalmurray/linear-action-items branch from a89135f to 41f0faf Compare April 7, 2026 19:40
@spalmurray spalmurray force-pushed the spalmurray/linear-action-items branch from 41f0faf to a2283c9 Compare April 7, 2026 21:22
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit fa3fcbe. Configure here.

@spalmurray
Copy link
Copy Markdown
Contributor Author

this is blocked by Linear not having org level API keys. Am working on a different approach

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants