feat(issue-list): add -i/--include-labels flag and fix --labels parser hole - #259
Merged
ruby-automation merged 2 commits intoSep 7, 2026
Merged
Conversation
…r hole Add an explicit boolean -i/--include-labels flag to issue list that controls label display independently of the existing -l/--labels filter. Close the motivating parser hole: parse_labels/1 now rejects any value token that starts with '-', so --labels --all exits with a clear usage error (Optimus exit 1) before any GraphQL request instead of silently treating --all as a label name. Separate the label-field selection concern from the label-filter concern throughout the stack: - cli.ex: add include_labels flag; harden parse_labels/1 - commands.ex: derive include_labels = flag || label_filter != []; pass it as both domain input and Display option - issue.ex: add include_labels: boolean argument to :list action; use (args.include_labels || args.labels != []) for document selection - ash-domain-erd.adoc: document the new argument and its semantics Add tests covering: --include-labels/-i, -N --include-labels --all, --labels --all parse error, -s/--status composition, positional ID with --include-labels, --output json --include-labels, and domain-level include_labels field selection behaviour. Closes EXT-45
…rse_labels Use two `parse_labels_result/2` clauses instead of a case expression, per idiomatic Elixir style for dispatching on nil vs. a value.
Contributor
Author
|
Rework: replaced non-idiomatic case with pattern-matched function heads Per review feedback on the Replaced the Quality gate: 482 tests pass, credo --strict clean, format clean. |
ruby-automation
deleted the
EXT-45-include-labels-issue-list-cli-contract
branch
September 7, 2026 15:00
This was referenced Sep 7, 2026
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
-i/--include-labelsboolean flag toissue listthat controls label display independently of the-l/--labels NAMEfilter--labels --allconsumed--allas a label name instead of erroring; now exits non-zero with a clear usage message before any API requestChanges
app/lib/linear_cli/cli.ex: addinclude_labelsflag (-i/--include-labels); hardenparse_labels/1to reject--prefixed tokensapp/lib/linear_cli/cli/commands.ex: deriveinclude_labels = flag || label_filter != []; pass to both domain input andDisplay.show/2app/lib/linear_cli/linear/issue.ex: addinclude_labels: :booleanargument to:listaction; useargs.include_labels || args.labels != []for GraphQL document selectiondocuments/ash-domain-erd.adoc: document new argument and its semanticsTest plan
--include-labels/-ishort flag requests label fields and shows them in compact output-N --include-labels --allsends no assignee/date filter, no label filter, requests label fields--labels --allexits non-zero with a clear usage error and sends no API request-s/--statuscomposes with--include-labels--include-labelsuses full lookup and renders labels--output json --include-labelsincludes fetched label objects in stdoutinclude_labels: truewith no label filter selects label fields without adding a label filterinclude_labels: falsewith no label filter does NOT include label fields in the queryCloses EXT-45
🤖 Generated with Claude Code