From 293ef01e141846f7de5af2c8c6be9d6c694083fd Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Wed, 4 Mar 2026 15:37:17 +0000 Subject: standardise on --label; add label filter and display to pr list/view - rename --hashtag (comma-separated) to --label (repeatable) on issue list, matching the --label flag already used on issue create - add --label filter to pr list with the same OR semantics (matching GitHub) - display labels column in pr list table and Labels: line in pr view - include labels array in all JSON outputs (list and view for both issue and pr) - rename internal 'hashtags' -> 'labels' throughout issue_list.rs and list.rs --- src/bin/ngit/cli.rs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/bin/ngit/cli.rs') diff --git a/src/bin/ngit/cli.rs b/src/bin/ngit/cli.rs index 0599b51..5ee9165 100644 --- a/src/bin/ngit/cli.rs +++ b/src/bin/ngit/cli.rs @@ -177,6 +177,10 @@ pub enum PrCommands { /// Filter by status (comma-separated: open,draft,closed,applied) #[arg(long, default_value = "open,draft")] status: String, + /// Filter by label (repeatable, OR logic: --label bug --label + /// help-wanted) + #[arg(long = "label", value_name = "LABEL")] + labels: Vec, /// Output as JSON #[arg(long)] json: bool, @@ -311,9 +315,10 @@ pub enum IssueCommands { /// Filter by status (comma-separated: open,draft,closed,applied) #[arg(long, default_value = "open")] status: String, - /// Filter by hashtag/label (comma-separated) - #[arg(long)] - hashtag: Option, + /// Filter by label (repeatable, OR logic: --label bug --label + /// help-wanted) + #[arg(long = "label", value_name = "LABEL")] + labels: Vec, /// Output as JSON #[arg(long)] json: bool, @@ -347,7 +352,7 @@ pub enum IssueCommands { /// Issue body / description #[arg(long)] body: Option, - /// Hashtag labels (repeatable: --label bug --label help-wanted) + /// Labels to apply (repeatable: --label bug --label help-wanted) #[arg(long = "label", value_name = "LABEL")] labels: Vec, }, -- cgit v1.2.3