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-05 14:19:49 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2026-03-05 14:23:07 +0000
commit37244449d6d0d58bb639f181bd15092de1acaaee (patch)
tree7de03867a1a9578e32fdbdbb2be63e863cea57a4 /src/bin/ngit/cli.rs
parent609f3c3db02d437222e2c8e171189179d06c3e9c (diff)
feat(cover-note): add kind-1624 cover notes for PRs, patches, and issues
Implements experimental kind-1624 cover note events: - KIND_COVER_NOTE constant and process_cover_note() in git_events.rs; replaceable semantics (latest created_at, hex-id tiebreak), author or maintainer only - kind-1624 events fetched alongside labels in the fetch pipeline; cover_notes count added to FetchReport display - ngit pr/issue view: cover note displayed in place of description with a clear 'Cover Note:' header; maintainer-authored notes identify the author; original description shown only with --comments; cover_note object included in --json output - ngit pr set-cover-note / ngit issue set-cover-note: publish a kind-1624 event; nostr: mentions in --body converted to q/p tags via tags_from_content (same rules as issue --body) - Fix pre-existing clippy::too_many_lines on repo/mod.rs show_info
Diffstat (limited to 'src/bin/ngit/cli.rs')
-rw-r--r--src/bin/ngit/cli.rs35
1 files changed, 34 insertions, 1 deletions
diff --git a/src/bin/ngit/cli.rs b/src/bin/ngit/cli.rs
index 8660b60..d558525 100644
--- a/src/bin/ngit/cli.rs
+++ b/src/bin/ngit/cli.rs
@@ -160,7 +160,8 @@ pub struct RepoSubCommandArgs {
160 /// Use local cache only, skip network fetch 160 /// Use local cache only, skip network fetch
161 #[arg(long)] 161 #[arg(long)]
162 pub offline: bool, 162 pub offline: bool,
163 /// Output repository info as JSON; `is_nostr_repo` is false when not in a nostr repository 163 /// Output repository info as JSON; `is_nostr_repo` is false when not in a
164 /// nostr repository
164 #[arg(long)] 165 #[arg(long)]
165 pub json: bool, 166 pub json: bool,
166} 167}
@@ -347,6 +348,22 @@ pub enum PrCommands {
347 #[arg(long)] 348 #[arg(long)]
348 offline: bool, 349 offline: bool,
349 }, 350 },
351 /// set or update the cover note for a PR (author or maintainer only)
352 ///
353 /// A cover note is a markdown body that replaces the displayed description.
354 /// nostr: mentions in --body are converted to q/p tags automatically.
355 #[command(name = "set-cover-note")]
356 SetCoverNote {
357 /// Proposal event-id (hex) or nevent (bech32)
358 #[arg(value_name = "ID|nevent")]
359 id: String,
360 /// Markdown body for the cover note
361 #[arg(long)]
362 body: String,
363 /// Use local cache only, skip network fetch
364 #[arg(long)]
365 offline: bool,
366 },
350} 367}
351 368
352// --------------------------------------------------------------------------- 369// ---------------------------------------------------------------------------
@@ -487,6 +504,22 @@ pub enum IssueCommands {
487 #[arg(long)] 504 #[arg(long)]
488 offline: bool, 505 offline: bool,
489 }, 506 },
507 /// set or update the cover note for an issue (author or maintainer only)
508 ///
509 /// A cover note is a markdown body that replaces the displayed description.
510 /// nostr: mentions in --body are converted to q/p tags automatically.
511 #[command(name = "set-cover-note")]
512 SetCoverNote {
513 /// Issue event-id (hex) or nevent (bech32)
514 #[arg(value_name = "ID|nevent")]
515 id: String,
516 /// Markdown body for the cover note
517 #[arg(long)]
518 body: String,
519 /// Use local cache only, skip network fetch
520 #[arg(long)]
521 offline: bool,
522 },
490} 523}
491 524
492#[derive(Subcommand)] 525#[derive(Subcommand)]