diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2026-03-04 15:23:54 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2026-03-04 15:23:54 +0000 |
| commit | b4c7b5e24d05aef878e155a1bedc22de54609fbb (patch) | |
| tree | 112334b99758251d4b784c33a8d64ba43ca1bd12 /src/bin/ngit/cli.rs | |
| parent | 7f7827e445029799400aacf69838e26299b6dc10 (diff) | |
add --comments flag to issue/pr view; show reply threading
- issue view and pr view now show only a comment count by default
- pass --comments to include the full thread
- JSON output always includes comment_count; comments array only with --comments
- each comment in the thread includes reply_to (null for top-level, parent
comment id for replies)
- human-readable view shows a dim '↳ reply to <short-id>' line on replies
Diffstat (limited to 'src/bin/ngit/cli.rs')
| -rw-r--r-- | src/bin/ngit/cli.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/bin/ngit/cli.rs b/src/bin/ngit/cli.rs index f18759b..0599b51 100644 --- a/src/bin/ngit/cli.rs +++ b/src/bin/ngit/cli.rs | |||
| @@ -187,7 +187,7 @@ pub enum PrCommands { | |||
| 187 | #[arg(long)] | 187 | #[arg(long)] |
| 188 | offline: bool, | 188 | offline: bool, |
| 189 | }, | 189 | }, |
| 190 | /// view a PR and its comments | 190 | /// view a PR; use --comments to include comment thread |
| 191 | View { | 191 | View { |
| 192 | /// Proposal event-id (hex) or nevent (bech32) | 192 | /// Proposal event-id (hex) or nevent (bech32) |
| 193 | #[arg(value_name = "ID|nevent")] | 193 | #[arg(value_name = "ID|nevent")] |
| @@ -195,6 +195,9 @@ pub enum PrCommands { | |||
| 195 | /// Output as JSON | 195 | /// Output as JSON |
| 196 | #[arg(long)] | 196 | #[arg(long)] |
| 197 | json: bool, | 197 | json: bool, |
| 198 | /// Include full comment thread (default: show count only) | ||
| 199 | #[arg(long)] | ||
| 200 | comments: bool, | ||
| 198 | /// Use local cache only, skip network fetch | 201 | /// Use local cache only, skip network fetch |
| 199 | #[arg(long)] | 202 | #[arg(long)] |
| 200 | offline: bool, | 203 | offline: bool, |
| @@ -321,7 +324,7 @@ pub enum IssueCommands { | |||
| 321 | #[arg(long)] | 324 | #[arg(long)] |
| 322 | offline: bool, | 325 | offline: bool, |
| 323 | }, | 326 | }, |
| 324 | /// view an issue and its comments | 327 | /// view an issue; use --comments to include comment thread |
| 325 | View { | 328 | View { |
| 326 | /// Issue event-id (hex) or nevent (bech32) | 329 | /// Issue event-id (hex) or nevent (bech32) |
| 327 | #[arg(value_name = "ID|nevent")] | 330 | #[arg(value_name = "ID|nevent")] |
| @@ -329,6 +332,9 @@ pub enum IssueCommands { | |||
| 329 | /// Output as JSON | 332 | /// Output as JSON |
| 330 | #[arg(long)] | 333 | #[arg(long)] |
| 331 | json: bool, | 334 | json: bool, |
| 335 | /// Include full comment thread (default: show count only) | ||
| 336 | #[arg(long)] | ||
| 337 | comments: bool, | ||
| 332 | /// Use local cache only, skip network fetch | 338 | /// Use local cache only, skip network fetch |
| 333 | #[arg(long)] | 339 | #[arg(long)] |
| 334 | offline: bool, | 340 | offline: bool, |