upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/bin/ngit/cli.rs
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2026-03-04 15:09:54 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2026-03-04 15:09:54 +0000
commit7f7827e445029799400aacf69838e26299b6dc10 (patch)
tree058871707600f821a45103049d48ad2a31bf19c0 /src/bin/ngit/cli.rs
parent7dcbdc7841e932570359ccef3b82459b89e6f2bc (diff)
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 <ID|nevent> 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)
Diffstat (limited to 'src/bin/ngit/cli.rs')
-rw-r--r--src/bin/ngit/cli.rs8
1 files changed, 8 insertions, 0 deletions
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 {
266 /// Comment body 266 /// Comment body
267 #[arg(long)] 267 #[arg(long)]
268 body: String, 268 body: String,
269 /// Reply to a specific comment event-id (hex) or nevent (bech32);
270 /// defaults to top-level
271 #[arg(long, value_name = "ID|nevent")]
272 reply_to: Option<String>,
269 /// Use local cache only, skip network fetch 273 /// Use local cache only, skip network fetch
270 #[arg(long)] 274 #[arg(long)]
271 offline: bool, 275 offline: bool,
@@ -367,6 +371,10 @@ pub enum IssueCommands {
367 /// Comment body 371 /// Comment body
368 #[arg(long)] 372 #[arg(long)]
369 body: String, 373 body: String,
374 /// Reply to a specific comment event-id (hex) or nevent (bech32);
375 /// defaults to top-level
376 #[arg(long, value_name = "ID|nevent")]
377 reply_to: Option<String>,
370 /// Use local cache only, skip network fetch 378 /// Use local cache only, skip network fetch
371 #[arg(long)] 379 #[arg(long)]
372 offline: bool, 380 offline: bool,