From ad6c39abdc35603f58e9b71993b5632c976deac1 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Thu, 5 Mar 2026 12:12:21 +0000 Subject: feat(status): add --reason to all pr and issue status commands All status transitions (pr close/reopen/ready/draft, issue close/reopen/ resolved) now accept an optional --reason flag stored in the event content. --- src/bin/ngit/main.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/bin/ngit/main.rs') diff --git a/src/bin/ngit/main.rs b/src/bin/ngit/main.rs index a0cb3e6..3686011 100644 --- a/src/bin/ngit/main.rs +++ b/src/bin/ngit/main.rs @@ -102,17 +102,17 @@ async fn main() { PrCommands::Send(sub_args) => { sub_commands::send::launch(&cli, sub_args, false).await } - PrCommands::Close { id, offline } => { - sub_commands::pr_status::launch_close(id, *offline).await + PrCommands::Close { id, reason, offline } => { + sub_commands::pr_status::launch_close(id, *offline, reason.as_deref()).await } - PrCommands::Reopen { id, offline } => { - sub_commands::pr_status::launch_reopen(id, *offline).await + PrCommands::Reopen { id, reason, offline } => { + sub_commands::pr_status::launch_reopen(id, *offline, reason.as_deref()).await } - PrCommands::Ready { id, offline } => { - sub_commands::pr_status::launch_ready(id, *offline).await + PrCommands::Ready { id, reason, offline } => { + sub_commands::pr_status::launch_ready(id, *offline, reason.as_deref()).await } - PrCommands::Draft { id, offline } => { - sub_commands::pr_status::launch_draft(id, *offline).await + PrCommands::Draft { id, reason, offline } => { + sub_commands::pr_status::launch_draft(id, *offline, reason.as_deref()).await } PrCommands::Comment { id, @@ -188,8 +188,8 @@ async fn main() { sub_commands::issue_status::launch_resolved(id, *offline, reason.as_deref()) .await } - IssueCommands::Reopen { id, offline } => { - sub_commands::issue_status::launch_reopen(id, *offline).await + IssueCommands::Reopen { id, reason, offline } => { + sub_commands::issue_status::launch_reopen(id, *offline, reason.as_deref()).await } IssueCommands::Comment { id, -- cgit v1.2.3