From 3908abbbfc5e748dd168d22bf5e3ea6aae17de61 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Wed, 4 Mar 2026 13:28:30 +0000 Subject: 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 - : optional positional argument (hex event-id or nevent) to show full details of a specific issue including body content --- src/bin/ngit/main.rs | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'src/bin/ngit/main.rs') 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 @@ #![cfg_attr(not(test), warn(clippy::expect_used))] use clap::Parser; -use cli::{AccountCommands, CUSTOMISE_TEMPLATE, Cli, Commands}; +use cli::{AccountCommands, CUSTOMISE_TEMPLATE, Cli, Commands, IssueCommands}; mod cli; use ngit::{ @@ -58,6 +58,24 @@ async fn main() { id, offline, } => sub_commands::list::launch(status.clone(), *json, id.clone(), *offline).await, + Commands::Issue(args) => match &args.issue_command { + IssueCommands::List { + status, + hashtag, + json, + id, + offline, + } => { + sub_commands::issue_list::launch( + status.clone(), + hashtag.clone(), + *json, + id.clone(), + *offline, + ) + .await + } + }, Commands::Send(args) => sub_commands::send::launch(&cli, args, false).await, Commands::Sync(args) => sub_commands::sync::launch(args).await, Commands::Checkout { id, offline } => { -- cgit v1.2.3