Pattern 1: CI failure → Linear issue
CI fails on main→ Create Linear issue: "[Repo] CI failure on main"→ Assign to: last committer→ Priority: urgent→ Include: error message, link to run, commit hash
Pattern 2: PR → Linear task link
PR opened→ Extract task ID from branch (e.g., DEV-123-feature-name)→ Add PR link to Linear task→ Add comment: "PR created: [link]"→ Update task status to "In Review"
Pattern 3: PR merge → task completion
PR merged→ Extract task ID from branch→ Update task status to "Done"→ Add comment: "Merged to main by [author]"
Pattern 4: Stale PR → reminder
PR open for 48h without review→ Find linked Linear task→ Add comment: "PR waiting for review 48h"→ Notify: tag reviewer in Slack or Linear
What else to automate
- Linear → GitHub label sync: Update GitHub labels from Linear status changes
- GitHub issue → Linear task: Create Linear tasks from GitHub issues
- Code review comments → Linear: Link review comments back to tasks
- Test results → Linear: Add test failure summaries to relevant tasks
Implementation tips
- Use branch naming: Enforce
TASK-ID-descriptionbranch naming to make extraction easy - Start with one pattern: Implement Pattern 1 (CI failure → Linear) first, it's the highest impact
- Two-way sync: Make the sync bidirectional when possible
- Handle errors gracefully: If task ID isn't found, log but don't fail