diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2026-03-05 12:02:09 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2026-03-05 12:08:56 +0000 |
| commit | b0ad2fd720d0cd335c07f22767844f571e3306ff (patch) | |
| tree | daed4f00be5edb09ba108dc40d66555053a39a73 /src/bin/ngit/main.rs | |
| parent | 3ac5395b47c709c00f0072668dfdceb04f2d4974 (diff) | |
feat(status): add pr draft, issue resolved, and --reason for issue close
Add `ngit pr draft <id>` to convert a PR back to draft (kind-1632).
Add `ngit issue resolved <id> [--reason <text>]` to mark an issue as
fixed (kind-1631 GitStatusApplied), distinct from close which signals
wontfix/duplicate/invalid.
Add `--reason <text>` to `ngit issue close` — stored in event content.
Also fix success/error message wording in pr_status and issue_status to
use consistent past-tense action strings.
Diffstat (limited to 'src/bin/ngit/main.rs')
| -rw-r--r-- | src/bin/ngit/main.rs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/bin/ngit/main.rs b/src/bin/ngit/main.rs index b0cf375..a0cb3e6 100644 --- a/src/bin/ngit/main.rs +++ b/src/bin/ngit/main.rs | |||
| @@ -111,6 +111,9 @@ async fn main() { | |||
| 111 | PrCommands::Ready { id, offline } => { | 111 | PrCommands::Ready { id, offline } => { |
| 112 | sub_commands::pr_status::launch_ready(id, *offline).await | 112 | sub_commands::pr_status::launch_ready(id, *offline).await |
| 113 | } | 113 | } |
| 114 | PrCommands::Draft { id, offline } => { | ||
| 115 | sub_commands::pr_status::launch_draft(id, *offline).await | ||
| 116 | } | ||
| 114 | PrCommands::Comment { | 117 | PrCommands::Comment { |
| 115 | id, | 118 | id, |
| 116 | body, | 119 | body, |
| @@ -178,8 +181,12 @@ async fn main() { | |||
| 178 | sub_commands::issue_create::launch(title.clone(), body.clone(), labels.clone()) | 181 | sub_commands::issue_create::launch(title.clone(), body.clone(), labels.clone()) |
| 179 | .await | 182 | .await |
| 180 | } | 183 | } |
| 181 | IssueCommands::Close { id, offline } => { | 184 | IssueCommands::Close { id, reason, offline } => { |
| 182 | sub_commands::issue_status::launch_close(id, *offline).await | 185 | sub_commands::issue_status::launch_close(id, *offline, reason.as_deref()).await |
| 186 | } | ||
| 187 | IssueCommands::Resolved { id, reason, offline } => { | ||
| 188 | sub_commands::issue_status::launch_resolved(id, *offline, reason.as_deref()) | ||
| 189 | .await | ||
| 183 | } | 190 | } |
| 184 | IssueCommands::Reopen { id, offline } => { | 191 | IssueCommands::Reopen { id, offline } => { |
| 185 | sub_commands::issue_status::launch_reopen(id, *offline).await | 192 | sub_commands::issue_status::launch_reopen(id, *offline).await |