Skip to content

feat(issue): include labels in Issue.full_fields and display - #210

Open
ruby-automation wants to merge 1 commit into
mainfrom
EXT-27-include-labels-in-full-fields
Open

feat(issue): include labels in Issue.full_fields and display#210
ruby-automation wants to merge 1 commit into
mainfrom
EXT-27-include-labels-in-full-fields

Conversation

@ruby-automation

Copy link
Copy Markdown
Contributor

Summary

  • Adds a :labels attribute ({:array, :term}, default []) to LinearCli.Linear.Issue
  • Extends Issue.full_fields/0 to request labels { nodes { ... } } from the Linear API, consistent with the existing comments pattern (full-detail queries only, not the paginated list)
  • Extends Issue.from_map/1 to parse labels.nodes into Label structs with a || [] fallback so base_fields responses (which omit labels) continue to work
  • Adds a "Labels: Bug, Feature" line to Display.issue_full/1 (shown with --full); suppressed when the issue has no labels

Closes EXT-27.

Test plan

  • issue_test.exs: added assertion that full_fields query contains "labels"; added test that labels are parsed from API response into Label structs
  • display_test.exs: added test that "Labels: Bug, Feature" appears in full output; added test that "Labels:" is omitted when no labels are present
  • All existing tests continue to pass (14 pre-existing failures in ProfileDefaultsTest are headless-git environment failures unrelated to this change)
  • mix compile --warnings-as-errors clean
  • Ash domain ERD doc updated per CLAUDE.md maintenance convention

🤖 Generated with Claude Code

- Add `:labels` attribute to `LinearCli.Linear.Issue` (`{:array, :term}`).
- Extend `full_fields/0` to request `labels { nodes { ... } }` using
  `Label.base_fields/0`, consistent with the existing `comments` pattern.
- Extend `from_map/1` to parse `labels.nodes` from API responses, with
  a `|| []` fallback so base_fields responses (which omit labels) are
  handled gracefully.
- Show a "Labels: ..." line in `Display.issue_full/1` when labels are
  present; suppress it when the list is empty via `Enum.reject`.
- Update tests: assert `full_fields` query contains "labels", verify
  label parsing from API response, and cover Display rendering.
- Update Ash domain ERD doc (CLAUDE.md maintenance convention).
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