Skip to content

feat(issue): add --labels filter to lc issue list - #206

Merged
ruby-automation merged 1 commit into
mainfrom
ext-26-label-filtering-issue-list
Sep 3, 2026
Merged

feat(issue): add --labels filter to lc issue list#206
ruby-automation merged 1 commit into
mainfrom
ext-26-label-filtering-issue-list

Conversation

@ruby-automation

Copy link
Copy Markdown
Contributor

Summary

  • Adds -l/--labels option to lc issue list for filtering by label name
  • Comma-separated OR semantics: --labels Bug,Feature returns issues carrying any of those labels
  • Case-insensitive matching via Linear API's IssueLabelCollectionFilter.some + eqIgnoreCase
  • Composes with all existing filters (--team, --project, --state, --status, --all)
  • Unknown label names return an empty result (no crash)

Closes EXT-26

Changes

  • app/lib/linear_cli/linear/issue.ex — add :labels argument to :list action; add maybe_put_label_filter/2 to build_filter/1 pipeline
  • app/lib/linear_cli/cli.ex — add -l/--labels option with parse_labels/1 parser
  • app/lib/linear_cli/cli/commands.ex — wire labels through issue_list/1 input map
  • documents/ash-domain-erd.adoc — update :list action description

Test plan

  • --labels Bug sends labels.some.name.eqIgnoreCase = "Bug" to Linear API
  • --labels Bug,Feature sends labels.some.or with two clauses (OR semantics)
  • Unknown label name (--labels no-such-label) returns empty result, no crash
  • --team ENG --labels Bug sends both team and labels filter keys
  • Domain-level: Linear.issues(%{labels: ["Bug"]}) sends correct GraphQL filter
  • Domain-level: Linear.issues(%{labels: ["Bug", "Feature"]}) sends correct OR filter
  • All 366 pre-existing tests still pass (2 GitTest failures are pre-existing environment issues unrelated to this change)
  • mix credo clean

Adds a -l/--labels option to `lc issue list` that filters issues by
label name. Accepts comma-separated names with OR semantics (an issue
matches if it carries any of the given labels). Filtering is
case-insensitive and handled server-side via the Linear API's
IssueLabelCollectionFilter.some + eqIgnoreCase.

- Add :labels argument to Issue :list read action
- Add maybe_put_label_filter/2 to Issue.Read.List.build_filter/1 pipeline
- Add -l/--labels option and parse_labels/1 parser to cli.ex
- Wire labels through Commands.issue_list/1 input map
- Update ash-domain-erd.adoc to document the new argument
- Add tests: single label, multi-label OR, unknown label (empty result),
  composition with --team; plus domain-level filter shape tests

Closes EXT-26
@ruby-automation
ruby-automation force-pushed the ext-26-label-filtering-issue-list branch from 8d4cce4 to 1f277d1 Compare September 3, 2026 15:55
@ruby-automation
ruby-automation merged commit f966f14 into main Sep 3, 2026
3 checks passed
@ruby-automation
ruby-automation deleted the ext-26-label-filtering-issue-list branch September 3, 2026 15:56
This was referenced Sep 3, 2026
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.

1 participant