Add optional comment retrieval to iw issue command #199

Closed
opened 2026-02-11 09:03:25 +00:00 by mprihoda · 1 comment
mprihoda commented 2026-02-11 09:03:25 +00:00 (Migrated from github.com)

Problem

iw issue currently only retrieves the issue description (body). Comments are not fetched from any tracker, which means important context added in discussion threads is invisible.

Scope

This affects all supported trackers:

  • GitHub — gh issue view --json comments returns {author, body, createdAt}
  • Linear — GraphQL API supports comments on issues
  • GitLab — glab / REST API supports issue notes (comments)
  • YouTrack — REST API supports issue comments

Proposed Behavior

  • iw issue ISSUE-ID — current behavior, description only (no change)
  • iw issue ISSUE-ID --comments — also fetch and display comments

Changes Needed

  1. Add comments: Option[List[Comment]] (or similar) to the Issue model
  2. Extend each tracker client's fetch to optionally request comments
  3. Update IssueFormatter to render comments when present
  4. Wire the --comments flag through the issue command
## Problem `iw issue` currently only retrieves the issue description (body). Comments are not fetched from any tracker, which means important context added in discussion threads is invisible. ## Scope This affects all supported trackers: - **GitHub** — `gh issue view --json comments` returns `{author, body, createdAt}` - **Linear** — GraphQL API supports `comments` on issues - **GitLab** — `glab` / REST API supports issue notes (comments) - **YouTrack** — REST API supports issue comments ## Proposed Behavior - `iw issue ISSUE-ID` — current behavior, description only (no change) - `iw issue ISSUE-ID --comments` — also fetch and display comments ## Changes Needed 1. Add `comments: Option[List[Comment]]` (or similar) to the `Issue` model 2. Extend each tracker client's fetch to optionally request comments 3. Update `IssueFormatter` to render comments when present 4. Wire the `--comments` flag through the `issue` command
Member

Intake: fixed by 225fd289

IW-610 (PR #728, merged to main as 225fd289) does all four changes that this issue asks for:

  1. core/model/IssueComment.scala adds the comment type (author, time, body, oldest first).
  2. Phase 1 (fcc8a735, #694) changes GitHubClient, GitLabClient, LinearClient, YouTrackClient and ForgejoClient so that they fetch comments.
  3. Phase 2 (4c364678, #695) makes IssueFormatter show the comments.
  4. core/commands/Issue.scala adds the --comments switch (example: iw issue TEST-42 --comments). Without the switch, iw issue shows only the description.

If this is not correct, reopen the issue.

Intake: fixed by 225fd289 IW-610 (PR #728, merged to `main` as 225fd289) does all four changes that this issue asks for: 1. `core/model/IssueComment.scala` adds the comment type (author, time, body, oldest first). 2. Phase 1 (fcc8a735, #694) changes `GitHubClient`, `GitLabClient`, `LinearClient`, `YouTrackClient` and `ForgejoClient` so that they fetch comments. 3. Phase 2 (4c364678, #695) makes `IssueFormatter` show the comments. 4. `core/commands/Issue.scala` adds the `--comments` switch (example: `iw issue TEST-42 --comments`). Without the switch, `iw issue` shows only the description. If this is not correct, reopen the issue.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
iterative-works/iw-cli#199
No description provided.