feat(#1778): add hive-forge ci-rerun to re-run CI without an empty commit
When a CI run fails for a transient reason (remote-builder flap, cold-daemon window, act_runner hiccup) the only retrigger path was an empty commit, which litters PR history and forces a force-push to clean up. This verb POSTs the rerun action directly. - `ci-rerun --run <n>` re-runs all jobs of a run (run number = the `runs/<n>` the UI shows, same value ci-log / artifact-get take, surfaced as a CI context's target_url by pr-status). - `--pr <n>` resolves the run from the PR head sha's CI status target_url. - `--job <i>` re-runs a single job. Forgejo exposes no REST endpoint for rerunning a run, so this rides the run page's web routes (`<base>/<owner>/<repo>/actions/runs/<n>[/jobs/<i>]/rerun`) via a new `Client::post_web_no_content` (web base like post_json_web, tolerates the redirect/empty response the rerun handler returns). Mirrors ci-log's web-route approach + auth path. docs/tools/forge.md updated with the verb.
This commit is contained in:
parent
658812c263
commit
cd4bdf4eea
5 changed files with 167 additions and 0 deletions
|
|
@ -9,6 +9,7 @@ pub mod attach;
|
|||
pub mod attachment_get;
|
||||
pub mod branches;
|
||||
pub mod ci_log;
|
||||
pub mod ci_rerun;
|
||||
pub mod clone;
|
||||
pub mod close;
|
||||
pub mod comment;
|
||||
|
|
|
|||
Loading…
Reference in a new issue