hive-forge: add repo-labels verb to list a repo's full label set

`labels <number>` only lists an issue/PR's labels; there was no way to
list the project-wide label set, which triage/labelling needs to discover
valid names. Add `repo-labels [pattern]` hitting GET /repos/{owner}/{repo}/labels
(paginated), with optional name-substring filter. Default prints one label
per line (name + tab-separated description when set); --json emits the full
label objects.
This commit is contained in:
atlas 2026-06-19 01:45:08 +02:00
commit 5a06d1156b
3 changed files with 60 additions and 0 deletions

View file

@ -91,6 +91,12 @@ enum Verb {
/// Add a collaborator to the active repo (`-r`/`HIVE_FORGE_REPO`)
/// with a permission level. Companion to `repo-create`.
RepoAddCollaborator(verbs::repo_add_collaborator::Args),
/// List the active repo's full label set (project-wide), optionally
/// filtered by a name substring. Unlike `labels <number>` (which lists
/// an issue/PR's labels), this shows every label defined on the repo —
/// the valid names + descriptions for triage / labelling. `--json`
/// emits the full label objects (id, name, color, description).
RepoLabels(verbs::repo_labels::Args),
/// Triage lint queries (unassigned / no-reviewer / stale-branches / assignments).
Lint(verbs::lint::Args),
/// List issues / PRs with filters (`--kind`, `--state`, `--assignee`,
@ -163,6 +169,7 @@ fn main() -> Result<()> {
Verb::Clone(a) => verbs::clone::run(&client, a),
Verb::RepoCreate(a) => verbs::repo_create::run(&client, a),
Verb::RepoAddCollaborator(a) => verbs::repo_add_collaborator::run(&client, a),
Verb::RepoLabels(a) => verbs::repo_labels::run(&client, a),
Verb::Lint(a) => verbs::lint::run(&client, a),
Verb::List(a) => verbs::list::run(&client, a),
Verb::Milestone(a) => verbs::milestone::run(&client, a),