From b4c7b5e24d05aef878e155a1bedc22de54609fbb Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Wed, 4 Mar 2026 15:23:54 +0000 Subject: add --comments flag to issue/pr view; show reply threading MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 ' line on replies --- src/bin/ngit/cli.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/bin/ngit/cli.rs') 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 { #[arg(long)] offline: bool, }, - /// view a PR and its comments + /// view a PR; use --comments to include comment thread View { /// Proposal event-id (hex) or nevent (bech32) #[arg(value_name = "ID|nevent")] @@ -195,6 +195,9 @@ pub enum PrCommands { /// Output as JSON #[arg(long)] json: bool, + /// Include full comment thread (default: show count only) + #[arg(long)] + comments: bool, /// Use local cache only, skip network fetch #[arg(long)] offline: bool, @@ -321,7 +324,7 @@ pub enum IssueCommands { #[arg(long)] offline: bool, }, - /// view an issue and its comments + /// view an issue; use --comments to include comment thread View { /// Issue event-id (hex) or nevent (bech32) #[arg(value_name = "ID|nevent")] @@ -329,6 +332,9 @@ pub enum IssueCommands { /// Output as JSON #[arg(long)] json: bool, + /// Include full comment thread (default: show count only) + #[arg(long)] + comments: bool, /// Use local cache only, skip network fetch #[arg(long)] offline: bool, -- cgit v1.2.3