Documentation
¶
Overview ¶
Command ghrun performs the GitHub Actions writes sessions used to type with `gh`: dispatch a workflow, re-run a run (or only its failed jobs), cancel a run. It shows the target first (the workflow or the run) and sends nothing else under --dry-run.
It exists because the standing rule is that every GitHub write goes through a fleet program, and `gh workflow run` (768 uses in the session record), `gh run rerun` (745) and `gh run cancel` (72) were the largest writes with no program. The HTTP and token handling is deliberately the same as ghissue's and is kept LOCAL (copied, not shared): the two differ in what they send, and the extraction would have to carry ghissue's test seams; it is a candidate for an internal package once a third program needs it.
The token is read from a 0600 file and sent only in the Authorization header, over https (http only for 127.0.0.1 test servers), redirects refused.
References (read 2026-11-08):
https://docs.github.com/en/rest/actions/workflows POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches,
"ref" required, "inputs" at most 25 properties; documented 200 with
workflow_run_id, run_url, html_url. The page does not document the
opt-in parameter nor the older 204 No Content, so BOTH 200 and 204
are accepted and a reply without a run id is reported as such.
GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}: id, name, path, state, html_url
https://docs.github.com/en/rest/actions/workflow-runs GET /repos/{owner}/{repo}/actions/runs/{run_id}: id, name, head_branch, head_sha, status, conclusion, html_url
POST .../runs/{run_id}/rerun and .../rerun-failed-jobs: 201
POST .../runs/{run_id}/cancel: 202, 409 when it cannot be cancelled