Fix: Add shorthand syntax support for notify send (#853) - #857
Merged
Conversation
added 2 commits
February 1, 2026 17:36
Documentation showed shorthand syntax 'work notify send TASK-001 to alerts' but implementation only accepted full syntax 'work notify send where <query> to <target>'. Changes: - Modified src/cli/commands/notify/send.ts to support both syntaxes - Removed fixed arg definitions, using strict=false for flexible parsing - Added argv parsing to detect shorthand vs full syntax - Shorthand 'TASK-001 to alerts' is converted to 'id=TASK-001' - Added test case for shorthand syntax in notify-workflow.test.ts - Updated examples to show shorthand first Fixes #853
Prevent malformed query 'id=' when task ID is empty. Addresses code review feedback.
Owner
Author
🔍 Automated Code ReviewSummaryThe implementation successfully adds shorthand syntax support for Findings✅ Strengths
|
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.
Summary
Documentation showed shorthand syntax
work notify send TASK-001 to alertsbut the implementation only accepted the full syntaxwork notify send where <query> to <target>. This PR adds support for both syntaxes.Root Cause
The CLI command had fixed argument definitions that required exactly 4 arguments in the specific order:
where,<query>,to,<target>. This made the shorthand syntax impossible.Changes
src/cli/commands/notify/send.tsstrict=false, added argv parsing to support both syntaxestests/e2e/notify-workflow.test.tsImplementation Details
strict=falseto allow flexible argument parsingargvdirectly to detect syntax typeTASK-001 to alerts→ converts to queryid=TASK-001where id=TASK-001 to alerts→ parses query normallyTesting
Validation
All tests passing ✅
Issue
Fixes #853
Implementation completed following project standards and testing requirements