upleb.uk

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

summaryrefslogtreecommitdiff
path: root/src/bin/ngit/main.rs
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2026-03-04 13:28:30 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2026-03-04 13:28:30 +0000
commit3908abbbfc5e748dd168d22bf5e3ea6aae17de61 (patch)
tree7d16390d57f8a7399212ebc30e6524ed25da1db6 /src/bin/ngit/main.rs
parenta554da3ec0bdfef648921fda41f38ad0a5d53d27 (diff)
feat: add ngit issue list command
Non-interactive listing of NIP-34 issues (kind 1621) with status resolution, hashtag display, and detail view. - get_issues_from_cache: fetch GitIssue events from local cache by repo coordinate, mirroring get_proposals_and_revisions_from_cache - ngit issue list: table output of ID, status, title and hashtags at end of each row; status resolved via existing get_status() logic - --status: comma-separated filter (open,draft,closed,applied; default: open) - --hashtag: comma-separated label filter (case-insensitive, OR match) - --json: machine-readable output including hashtags and description - --offline: skip network fetch, use local cache only - <id>: optional positional argument (hex event-id or nevent) to show full details of a specific issue including body content
Diffstat (limited to 'src/bin/ngit/main.rs')
-rw-r--r--src/bin/ngit/main.rs20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/bin/ngit/main.rs b/src/bin/ngit/main.rs
index 5a7654a..cb0cc52 100644
--- a/src/bin/ngit/main.rs
+++ b/src/bin/ngit/main.rs
@@ -3,7 +3,7 @@
3#![cfg_attr(not(test), warn(clippy::expect_used))] 3#![cfg_attr(not(test), warn(clippy::expect_used))]
4 4
5use clap::Parser; 5use clap::Parser;
6use cli::{AccountCommands, CUSTOMISE_TEMPLATE, Cli, Commands}; 6use cli::{AccountCommands, CUSTOMISE_TEMPLATE, Cli, Commands, IssueCommands};
7 7
8mod cli; 8mod cli;
9use ngit::{ 9use ngit::{
@@ -58,6 +58,24 @@ async fn main() {
58 id, 58 id,
59 offline, 59 offline,
60 } => sub_commands::list::launch(status.clone(), *json, id.clone(), *offline).await, 60 } => sub_commands::list::launch(status.clone(), *json, id.clone(), *offline).await,
61 Commands::Issue(args) => match &args.issue_command {
62 IssueCommands::List {
63 status,
64 hashtag,
65 json,
66 id,
67 offline,
68 } => {
69 sub_commands::issue_list::launch(
70 status.clone(),
71 hashtag.clone(),
72 *json,
73 id.clone(),
74 *offline,
75 )
76 .await
77 }
78 },
61 Commands::Send(args) => sub_commands::send::launch(&cli, args, false).await, 79 Commands::Send(args) => sub_commands::send::launch(&cli, args, false).await,
62 Commands::Sync(args) => sub_commands::sync::launch(args).await, 80 Commands::Sync(args) => sub_commands::sync::launch(args).await,
63 Commands::Checkout { id, offline } => { 81 Commands::Checkout { id, offline } => {