Skip to content

feat(reactions): wire up Linear reaction for Comment.create webhook events#1106

Merged
aaight merged 1 commit intodevfrom
feature/linear-reactions
Apr 14, 2026
Merged

feat(reactions): wire up Linear reaction for Comment.create webhook events#1106
aaight merged 1 commit intodevfrom
feature/linear-reactions

Conversation

@aaight
Copy link
Copy Markdown
Collaborator

@aaight aaight commented Apr 14, 2026

Summary

  • Implements sendLinearReaction in src/router/reactions.ts — previously a no-op placeholder, now adds a 👀 reaction to Linear comments on Comment.create webhook events
  • Resolves Linear API key via getIntegrationCredential(projectId, 'pm', 'api_key') following the same credential resolution pattern as Trello/JIRA
  • Calls linearClient.createReaction(commentId, '👀') wrapped in withLinearCredentials — consistent with existing client patterns
  • Non-comment events (Issue.update etc.) are silently skipped; errors are caught and logged, never propagated

Test plan

  • sendLinearReaction sends 👀 reaction for Comment.create events
  • Non-comment Linear events (Issue.update, Comment.update) are silently skipped
  • Missing credentials are handled gracefully with a warning log (no throw)
  • API errors are caught and logged, never propagated
  • Missing comment ID in payload is handled gracefully
  • All existing tests (Trello, GitHub, JIRA) continue to pass (32 total tests passing)
  • Lint and type checks pass

Card: https://trello.com/c/69deb0cb7779e42640f5647a

🤖 Generated with Claude Code

🕵️ claude-code · claude-sonnet-4-6 · run details

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Collaborator

@nhopeatall nhopeatall left a comment

Choose a reason for hiding this comment

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

Summary

LGTM — Clean implementation that correctly wires up Linear comment reactions following established patterns. The payload parsing matches the Linear webhook format used throughout the codebase, error handling follows the fire-and-forget contract, and tests are comprehensive.

One minor observation (not blocking): sendLinearReaction resolves credentials inline via getIntegrationCredential(projectId, 'pm', 'api_key') rather than reusing the existing resolveLinearCredentials() helper from platformClients/credentials.ts (which does the exact same thing). The Trello reaction sender uses the shared resolveTrelloCredentials() helper, so there's a small pattern inconsistency. The behavior is identical either way.

🕵️ claude-code · claude-opus-4-6 · run details

@aaight aaight merged commit 09ee1a7 into dev Apr 14, 2026
9 checks passed
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