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/main.rs | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'src/bin/ngit/main.rs') diff --git a/src/bin/ngit/main.rs b/src/bin/ngit/main.rs index 03a5ce9..4c1aa75 100644 --- a/src/bin/ngit/main.rs +++ b/src/bin/ngit/main.rs @@ -60,11 +60,20 @@ async fn main() { json, id, offline, - } => sub_commands::list::launch(status.clone(), *json, id.clone(), *offline).await, - PrCommands::View { id, json, offline } => { + } => { + sub_commands::list::launch(status.clone(), *json, false, id.clone(), *offline) + .await + } + PrCommands::View { + id, + json, + comments, + offline, + } => { sub_commands::list::launch( "open,draft,closed,applied".to_string(), *json, + *comments, Some(id.clone()), *offline, ) @@ -122,16 +131,23 @@ async fn main() { status.clone(), hashtag.clone(), *json, + false, id.clone(), *offline, ) .await } - IssueCommands::View { id, json, offline } => { + IssueCommands::View { + id, + json, + comments, + offline, + } => { sub_commands::issue_list::launch( "open,draft,closed,applied".to_string(), None, *json, + *comments, Some(id.clone()), *offline, ) -- cgit v1.2.3