feat(issue): include labels in Issue.full_fields and display - #210
Open
ruby-automation wants to merge 1 commit into
Open
feat(issue): include labels in Issue.full_fields and display#210ruby-automation wants to merge 1 commit into
ruby-automation wants to merge 1 commit into
Conversation
- 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).
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
:labelsattribute ({:array, :term}, default[]) toLinearCli.Linear.IssueIssue.full_fields/0to requestlabels { nodes { ... } }from the Linear API, consistent with the existingcommentspattern (full-detail queries only, not the paginated list)Issue.from_map/1to parselabels.nodesintoLabelstructs with a|| []fallback sobase_fieldsresponses (which omit labels) continue to workDisplay.issue_full/1(shown with--full); suppressed when the issue has no labelsCloses EXT-27.
Test plan
issue_test.exs: added assertion thatfull_fieldsquery contains"labels"; added test that labels are parsed from API response intoLabelstructsdisplay_test.exs: added test that "Labels: Bug, Feature" appears in full output; added test that "Labels:" is omitted when no labels are presentProfileDefaultsTestare headless-git environment failures unrelated to this change)mix compile --warnings-as-errorsclean🤖 Generated with Claude Code