rafa pages
- rafa
- rafa ci
rafa ci
Read the newest CI run on a branch: its state, the commit it ran on and the test cases it failed.
rafa ci reads the newest CI run on a branch through the GitHub CLI.
Spends: nothing. Changes: nothing. Needs: gh signed in; see Prerequisites.
In the target layout this code's package is not decided yet: the migration places it in a later pass (#801). In 0.47.0 it lives in the root package's src/. Either way it ships inside @open-tomato/rafa. [TBD: target package]
Actions
| Action | Does |
|---|---|
status | the newest CI run on a branch: its state, its commit and the cases it failed |
rafa ci status
The newest CI run on a branch: its state, its commit and the cases it failed.
rafa ci status [--branch=<string>] [--workflow=<string>]
Reads the newest GitHub Actions run on --branch, of the workflow --workflow when one is named, and prints its state and its short commit; for a red run it also reads the run's failed log and prints the bun cases that failed, by file and case, each once. Only the conclusion success is green. Exit code 0 when the run is green, 1 when it is red, 2 when the branch has no run and 3 while the run is not finished; 4 for a line it refuses and for any gh failure, a workflow gh does not know included. With --output=json the branch, the workflow, the verdict, the run, the failed cases and the exit code are written as a ci-status event on every verdict, and are the data of the terminal result when the run is green. Starts no session.
| Flag | Type and default | What it does |
|---|---|---|
--branch | string | The branch whose newest run is read. |
--workflow | string | Read only runs of this workflow, named as gh run list --workflow takes it. |
Examples:
rafa ci status --branch=stretch/9: Prints the newest run on stretch/9 and, when it is red, the cases it failed.rafa ci status --branch=main --workflow=verify.yml --output=json: Writes the newest verify run on main as a ci-status event.
Output formats: text, json.