fix: support comma-separated webhook events in --events flag#132
Merged
felipefreitag merged 2 commits intomainfrom Mar 19, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
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.
vcapretz
approved these changes
Mar 19, 2026
5d494af to
f9b045a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.