diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2026-03-04 15:37:17 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2026-03-04 15:37:17 +0000 |
| commit | 293ef01e141846f7de5af2c8c6be9d6c694083fd (patch) | |
| tree | d4ee20d9a89fe622fcfa058e600fdd25e56eab91 /src/bin/ngit/cli.rs | |
| parent | b4c7b5e24d05aef878e155a1bedc22de54609fbb (diff) | |
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
Diffstat (limited to 'src/bin/ngit/cli.rs')
| -rw-r--r-- | src/bin/ngit/cli.rs | 13 |
1 files changed, 9 insertions, 4 deletions
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 { | |||
| 177 | /// Filter by status (comma-separated: open,draft,closed,applied) | 177 | /// Filter by status (comma-separated: open,draft,closed,applied) |
| 178 | #[arg(long, default_value = "open,draft")] | 178 | #[arg(long, default_value = "open,draft")] |
| 179 | status: String, | 179 | status: String, |
| 180 | /// Filter by label (repeatable, OR logic: --label bug --label | ||
| 181 | /// help-wanted) | ||
| 182 | #[arg(long = "label", value_name = "LABEL")] | ||
| 183 | labels: Vec<String>, | ||
| 180 | /// Output as JSON | 184 | /// Output as JSON |
| 181 | #[arg(long)] | 185 | #[arg(long)] |
| 182 | json: bool, | 186 | json: bool, |
| @@ -311,9 +315,10 @@ pub enum IssueCommands { | |||
| 311 | /// Filter by status (comma-separated: open,draft,closed,applied) | 315 | /// Filter by status (comma-separated: open,draft,closed,applied) |
| 312 | #[arg(long, default_value = "open")] | 316 | #[arg(long, default_value = "open")] |
| 313 | status: String, | 317 | status: String, |
| 314 | /// Filter by hashtag/label (comma-separated) | 318 | /// Filter by label (repeatable, OR logic: --label bug --label |
| 315 | #[arg(long)] | 319 | /// help-wanted) |
| 316 | hashtag: Option<String>, | 320 | #[arg(long = "label", value_name = "LABEL")] |
| 321 | labels: Vec<String>, | ||
| 317 | /// Output as JSON | 322 | /// Output as JSON |
| 318 | #[arg(long)] | 323 | #[arg(long)] |
| 319 | json: bool, | 324 | json: bool, |
| @@ -347,7 +352,7 @@ pub enum IssueCommands { | |||
| 347 | /// Issue body / description | 352 | /// Issue body / description |
| 348 | #[arg(long)] | 353 | #[arg(long)] |
| 349 | body: Option<String>, | 354 | body: Option<String>, |
| 350 | /// Hashtag labels (repeatable: --label bug --label help-wanted) | 355 | /// Labels to apply (repeatable: --label bug --label help-wanted) |
| 351 | #[arg(long = "label", value_name = "LABEL")] | 356 | #[arg(long = "label", value_name = "LABEL")] |
| 352 | labels: Vec<String>, | 357 | labels: Vec<String>, |
| 353 | }, | 358 | }, |