Skip to content

feat(webhooks): add Linear webhook info to webhooks dashboard and CLI tool#1108

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

feat(webhooks): add Linear webhook info to webhooks dashboard and CLI tool#1108
aaight merged 1 commit intodevfrom
feature/linear-webhook-info

Conversation

@aaight
Copy link
Copy Markdown
Collaborator

@aaight aaight commented Apr 14, 2026

Summary

  • Add LinearWebhookInfo type to webhooks/types.ts (same shape as SentryWebhookInfo)
  • Add linearApiKey and linearWebhookSecretSet to ProjectContext in webhooks/types.ts
  • Update resolveProjectContext() to populate linearApiKey/linearWebhookSecretSet from credentials
  • Add linearApiKey to oneTimeTokensSchema and applyOneTimeTokens() for fresh credential passthrough
  • Update webhooks.list query to return linear: LinearWebhookInfo | null and include linear: null in errors object
  • Update webhooks.create mutation to return informational linear: LinearWebhookInfo (display-only, no actual creation)
  • Export LinearWebhookInfo from webhooks.ts
  • Update CLI webhooks list command to display Linear webhook info
  • Update CLI webhooks create command to display Linear manual setup instructions
  • Update tools/setup-webhooks.ts to show Linear webhook URL and manual setup instructions in list and create commands

Test plan

  • New LinearWebhookInfo type defined correctly
  • ProjectContext includes linearApiKey and linearWebhookSecretSet fields
  • oneTimeTokensSchema includes linearApiKey
  • applyOneTimeTokens applies linearApiKey override
  • list returns linear webhook info when pmType === 'linear' and linearApiKey is set
  • list returns null when no callbackBaseUrl or no linearApiKey
  • list errors object includes linear: null
  • create returns linear webhook info for Linear PM projects
  • create does NOT return linear info for non-Linear projects
  • All existing tests pass (7488 total)
  • Type checking passes
  • Lint passes (only pre-existing warnings)

Trello card: https://trello.com/c/69deb0e780e6f5a20d70f6bb

🤖 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

❌ Patch coverage is 53.19149% with 22 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/cli/dashboard/webhooks/create.ts 0.00% 16 Missing ⚠️
src/cli/dashboard/webhooks/list.ts 55.55% 4 Missing ⚠️
src/api/routers/webhooks.ts 88.88% 2 Missing ⚠️

📢 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, well-structured addition of Linear webhook informational display to the webhooks dashboard and CLI. The implementation correctly follows the existing Sentry pattern (informational-only, no programmatic creation/deletion), with consistent changes across all layers: types, context resolution, one-time token support, API router, CLI commands, and the standalone setup-webhooks tool. Tests are thorough with 196 new lines covering all key scenarios.

A few observations (none blocking):

  1. The errors object now includes linear: null (always hardcoded null), whereas the analogous Sentry info has no entry in errors at all. This is a minor inconsistency but arguably better — it provides explicit typing for clients that enumerate the errors object.

  2. The tools/setup-webhooks.ts tool conditionally warns about missing Trello creds only when pmType === 'trello', which is a nice improvement over the previous unconditional warning for non-Trello projects.

  3. CI is all green — lint, typecheck, unit tests (7488), integration tests, and Docker builds all pass.

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

@aaight aaight merged commit 4fc794b into dev Apr 14, 2026
8 of 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