Skip to content

fix: support comma-separated webhook events in --events flag#132

Merged
felipefreitag merged 2 commits intomainfrom
worktree-fix-eng-4700-webhook-events-comma-support
Mar 19, 2026
Merged

fix: support comma-separated webhook events in --events flag#132
felipefreitag merged 2 commits intomainfrom
worktree-fix-eng-4700-webhook-events-comma-support

Conversation

@felipefreitag
Copy link
Contributor

No description provided.

@felipefreitag felipefreitag marked this pull request as ready for review March 19, 2026 18:14
@felipefreitag felipefreitag requested a review from vcapretz March 19, 2026 18:14
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

cubic analysis

2 issues found across 5 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/commands/webhooks/update.ts">

<violation number="1" location="src/commands/webhooks/update.ts:64">
P2: Comma-separated input containing `all` is not handled correctly; `all` is passed as a literal event instead of expanding to all webhook events. According to linked Linear issue ENG-4700, comma-separated events should be supported, so `all,email.bounced` should also be interpreted correctly.</violation>
</file>

<file name="src/commands/webhooks/listen.ts">

<violation number="1" location="src/commands/webhooks/listen.ts:188">
P2: Comma-separated input containing `all` is not handled correctly because `all` detection happens before normalization.</violation>
</file>

Linked issue analysis

Linked issue: ENG-4700: - webhooks create: make it clearer events are separated by spaces, maybe support commas

Status Acceptance criteria Notes
Support comma-separated webhook events in --events flag Added normalizeEvents and wired it into create/listen/update
Accept mixed comma and space-separated events normalizeEvents handles comma split and multiple args; test added
Trim spaces around comma-separated events normalizeEvents trims entries and test verifies trimming
Update help text and examples to indicate comma or space-separated events Option descriptions and examples updated to mention commas
Ensure listen and update commands also support comma-separated events listen/update now import and use normalizeEvents like create
Add tests verifying comma-splitting behavior Three tests added covering comma split, mixed, and trimming
Improve error message to hint about space vs comma separation when user passes comma-separated input No changes to error handling or user-facing error messages

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@felipefreitag felipefreitag force-pushed the worktree-fix-eng-4700-webhook-events-comma-support branch from 5d494af to f9b045a Compare March 19, 2026 19:13
@felipefreitag felipefreitag merged commit e54e7db into main Mar 19, 2026
6 checks passed
@felipefreitag felipefreitag deleted the worktree-fix-eng-4700-webhook-events-comma-support branch March 19, 2026 19:13
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