feat: support comma-separated values in --state flag#189
Draft
jholm117 wants to merge 1 commit intoschpet:mainfrom
Draft
feat: support comma-separated values in --state flag#189jholm117 wants to merge 1 commit intoschpet:mainfrom
jholm117 wants to merge 1 commit intoschpet:mainfrom
Conversation
Allow `--state triage,started` as a shorthand for `--state triage --state started`. Values are split on commas, trimmed, and validated against the set of valid states (triage, backlog, unstarted, started, completed, canceled). Invalid values produce a clear ValidationError. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
--state triage,startedas a shorthand for--state triage --state startedValidationErrorwith the list of valid statesMotivation
Passing
--state triage,startedis the intuitive way to specify multiple states in a single flag, but previously only the repeated flag form (--state triage --state started) worked. This change supports both forms.Changes
src/commands/issue/issue-list.ts— Changed--stateflag type fromstate(EnumType) tostringso comma-separated values pass through Cliffy parsing. AddedflatMap+split(",")to parse comma-separated values, with manual validation againstvalidStates.test/commands/issue/issue-list.test.ts— Added snapshot tests for invalid comma-separated state and invalid single state validation errors.test/commands/issue/__snapshots__/issue-list.test.ts.snap— Updated help text snapshot (new description) and added error output snapshots.Test plan
deno test --allow-all --quiet test/commands/issue/issue-list.test.ts— 3/3 passdeno check src/commands/issue/issue-list.ts— cleandeno lint src/commands/issue/issue-list.ts— cleanlinear issue list --state triage,started --sort prioritylinear issue list --state triage --state started --sort priority(existing behavior preserved)🤖 Generated with Claude Code