From b0ad2fd720d0cd335c07f22767844f571e3306ff Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Thu, 5 Mar 2026 12:02:09 +0000 Subject: feat(status): add pr draft, issue resolved, and --reason for issue close MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add `ngit pr draft ` to convert a PR back to draft (kind-1632). Add `ngit issue resolved [--reason ]` to mark an issue as fixed (kind-1631 GitStatusApplied), distinct from close which signals wontfix/duplicate/invalid. Add `--reason ` 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. --- src/bin/ngit/cli.rs | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'src/bin/ngit/cli.rs') diff --git a/src/bin/ngit/cli.rs b/src/bin/ngit/cli.rs index b9b274e..37d85a2 100644 --- a/src/bin/ngit/cli.rs +++ b/src/bin/ngit/cli.rs @@ -270,6 +270,15 @@ pub enum PrCommands { #[arg(long)] offline: bool, }, + /// convert a PR back to draft (author or maintainer only) + Draft { + /// Proposal event-id (hex) or nevent (bech32) + #[arg(value_name = "ID|nevent")] + id: String, + /// Use local cache only, skip network fetch + #[arg(long)] + offline: bool, + }, /// add a comment to a PR Comment { /// Proposal event-id (hex) or nevent (bech32) @@ -373,11 +382,29 @@ pub enum IssueCommands { #[arg(long = "label", value_name = "LABEL")] labels: Vec, }, - /// close an issue (author or maintainer only) + /// close an issue without resolving it (author or maintainer only) Close { /// Issue event-id (hex) or nevent (bech32) #[arg(value_name = "ID|nevent")] id: String, + /// Optional reason (e.g. wontfix, duplicate, invalid) + #[arg(long)] + reason: Option, + /// Use local cache only, skip network fetch + #[arg(long)] + offline: bool, + }, + /// mark an issue as resolved (author or maintainer only) + #[command( + long_about = "mark an issue as resolved (author or maintainer only)\n\nuse this when the issue has been fixed or addressed, as distinct from closing without resolution" + )] + Resolved { + /// Issue event-id (hex) or nevent (bech32) + #[arg(value_name = "ID|nevent")] + id: String, + /// Optional reason or resolution summary + #[arg(long)] + reason: Option, /// Use local cache only, skip network fetch #[arg(long)] offline: bool, -- cgit v1.2.3