diff options
Diffstat (limited to 'src/bin/ngit/cli.rs')
| -rw-r--r-- | src/bin/ngit/cli.rs | 35 |
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)] |