From 3ac5395b47c709c00f0072668dfdceb04f2d4974 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Thu, 5 Mar 2026 11:33:10 +0000 Subject: feat(label): add `ngit issue label` and `ngit pr label` commands Publishes a NIP-32 kind-1985 label event referencing the target issue or PR. Only the event author or a repository maintainer may apply labels. Duplicate labels (already present via t-tags or prior kind-1985 events) are silently skipped. The new event is saved to the local cache before broadcasting so subsequent reads reflect the change immediately. CLI: ngit issue label --label [--label ...] ngit pr label --label [--label ...] --- src/bin/ngit/main.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/bin/ngit/main.rs') diff --git a/src/bin/ngit/main.rs b/src/bin/ngit/main.rs index 6a5a8f0..b0cf375 100644 --- a/src/bin/ngit/main.rs +++ b/src/bin/ngit/main.rs @@ -130,6 +130,11 @@ async fn main() { squash, offline, } => sub_commands::pr_merge::launch(id, *squash, *offline).await, + PrCommands::Label { + id, + labels, + offline, + } => sub_commands::label::launch_pr_label(id, labels, *offline).await, }, Commands::Issue(args) => match &args.issue_command { IssueCommands::List { @@ -193,6 +198,11 @@ async fn main() { ) .await } + IssueCommands::Label { + id, + labels, + offline, + } => sub_commands::label::launch_issue_label(id, labels, *offline).await, }, Commands::Sync(args) => sub_commands::sync::launch(args).await, } -- cgit v1.2.3