From 7f7827e445029799400aacf69838e26299b6dc10 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Wed, 4 Mar 2026 15:09:54 +0000 Subject: fix NIP-22 compliance and add --reply-to flag for issue/PR comments - Add missing P and p tags (root and parent author pubkeys) - Fix E tag 4th element to be root pubkey (was empty string) - Fix e tag 4th element to be parent pubkey (was "reply", a NIP-10 convention) - Add --reply-to flag to both issue and PR comment commands - When --reply-to is set, look up the parent comment from cache and use it as the parent scope (e/k/p); root scope (E/K/P) always stays the issue/PR - When --reply-to is omitted, parent == root (existing top-level behaviour) --- src/bin/ngit/cli.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/bin/ngit/cli.rs') diff --git a/src/bin/ngit/cli.rs b/src/bin/ngit/cli.rs index 452491c..f18759b 100644 --- a/src/bin/ngit/cli.rs +++ b/src/bin/ngit/cli.rs @@ -266,6 +266,10 @@ pub enum PrCommands { /// Comment body #[arg(long)] body: String, + /// Reply to a specific comment event-id (hex) or nevent (bech32); + /// defaults to top-level + #[arg(long, value_name = "ID|nevent")] + reply_to: Option, /// Use local cache only, skip network fetch #[arg(long)] offline: bool, @@ -367,6 +371,10 @@ pub enum IssueCommands { /// Comment body #[arg(long)] body: String, + /// Reply to a specific comment event-id (hex) or nevent (bech32); + /// defaults to top-level + #[arg(long, value_name = "ID|nevent")] + reply_to: Option, /// Use local cache only, skip network fetch #[arg(long)] offline: bool, -- cgit v1.2.3