Watch
0
0
Fork
You've already forked hyperhive
0

hive-forge: ci-rerun takes repeatable --input key=value for workflow dispatch

The dispatch goes out as a raw API POST so a forge rejection of an input
reaches the caller with its response body.
This commit is contained in:
atlas 2026-11-19 10:26:32 +01:00 • committed by mara
commit 439cb28c8c
2 changed files with 378 additions and 19 deletions

View file

@ -117,7 +117,7 @@ Deadline: hive-forge stops after HIVE_FORGE_DEADLINE seconds (default 900), prin
* `attachment-get` — Download an attachment by UUID or URL. Saves to a temp file and prints the path (pass `-o -` to stream raw bytes to stdout)
* `artifact-get` — Download a CI Actions artifact from a run (`<name> --run <n>`). Saves a zip, or pass `-o -` to stream to stdout
* `ci-log` — Print a CI Actions run's job step logs (`--run <n> [--job i] [--step i]`)
* `ci-rerun` — Re-run CI without an empty commit. Pass one of `--pr <n>`, `--run <n>`, or `--branch <name>`; `--workflow` defaults to `ci.yml`
* `ci-rerun` — Re-run CI without an empty commit. Pass one of `--pr <n>`, `--run <n>`, or `--branch <name>`; `--workflow` defaults to `ci.yml`. `--input key=value` (repeatable) passes workflow inputs, for example one VM test: `--workflow vm-nightly.yml --input test=<name>`
* `ci-runs` — List CI Actions runs, newest first (`--workflow`, `--branch`, `--limit`, `--page`) — the run numbers `ci-log`/`ci-rerun --run`/ `artifact-get --run` take
###### **Options:**
@ -1398,7 +1398,7 @@ Print a CI Actions run's job step logs (`--run <n> [--job i] [--step i]`)
## `hive-forge ci-rerun`
Re-run CI without an empty commit. Pass one of `--pr <n>`, `--run <n>`, or `--branch <name>`; `--workflow` defaults to `ci.yml`
Re-run CI without an empty commit. Pass one of `--pr <n>`, `--run <n>`, or `--branch <name>`; `--workflow` defaults to `ci.yml`. `--input key=value` (repeatable) passes workflow inputs, for example one VM test: `--workflow vm-nightly.yml --input test=<name>`
**Usage:** `hive-forge ci-rerun [OPTIONS]`
@ -1410,6 +1410,7 @@ Re-run CI without an empty commit. Pass one of `--pr <n>`, `--run <n>`, or `--br
* `--workflow <WORKFLOW>` — Workflow file to run (default `ci.yml`). Ignored for `--run`, which uses the run's own workflow
Default value: `ci.yml`
* `--input <KEY=VALUE>` — Workflow input for the dispatch, `key=value` (repeatable; the value may be empty or contain `=`). The workflow lists its inputs under `on.workflow_dispatch.inputs`; for an unknown input the forge's own error comes back unchanged. Example: `--workflow vm-nightly.yml --input test=k8s-swarm-images` runs one VM test instead of all of them

View file

@ -115,6 +115,7 @@ hive-forge attach-comment 18042 /path/to/file # upload a file attachment to a c
hive-forge attachment-get <uuid> # download an attachment; prints resolved path to stdout
hive-forge artifact-get pr1ma-paper-pdf --run 51 # download a CI run's Actions artifact zip (run number from the run-page URL)
hive-forge ci-log --run 51 # print a CI run's job step logs (run number from the run-page URL); --job i / --step i to narrow
hive-forge ci-rerun --branch foo --workflow vm-nightly.yml --input test=<name> # dispatch one VM test (repeatable --input key=value)
hive-forge ci-rerun --branch foo # re-run CI without an empty commit (dispatches a fresh run; --run n also works unless that run was PR-triggered; --pr refuses, see below)
hive-forge subscription --watch # subscribe to repo notifications
hive-forge subscription --unwatch # unsubscribe
@ -302,7 +303,7 @@ to discover valid label names before triaging or to audit the label set.
re-runs increment it). `--json` wraps the output.
- `ci-rerun` re-runs CI: it dispatches a
**fresh** run of the workflow via the workflow-dispatch API
(`POST …/actions/workflows/<workflow>/dispatches {"ref":"<branch>"}`).
(`POST …/actions/workflows/<workflow>/dispatches {"ref":"<branch>","inputs":{…}}`).
Resolve the branch with `--run <n>` (the same run number `ci-log` /
`artifact-get` take — resolves the branch + workflow from that run) or
`--branch <name>` (directly). `--pr <n>`, and `--run <n>` against a run
@ -310,7 +311,12 @@ to discover valid label names before triaging or to audit the label set.
a workflow-dispatch run writes no commit status, so it can't clear a
red `(pull_request)` check on that PR's sha — re-run from the web UI
instead. `--workflow <file>` picks the workflow file for `--branch`
(default `ci.yml`). Dispatch re-runs the whole workflow — there is no
(default `ci.yml`). `--input key=value` (repeatable) sets workflow
inputs in the dispatch body, for example `--branch k8s/v1 --workflow
vm-nightly.yml --input test=k8s-swarm-images` runs one VM test; an input
the workflow doesn't declare comes back as the forge's own error. The
verb prints the `ci-runs` command that follows the new run. Dispatch
re-runs the whole workflow — there is no
single-job variant.
- `issue dependency <n> add <dep...>` / `pr dependency <n> add <dep...>`
set "blocked by" links via Forgejo's dependency feature — the