feat(actions): list workflow runs #87
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/actions-runs-command"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
fj actionscould list tasks (one job execution each) but never the workflow-level runs, so a consumer that needs a run's branch, workflow file, or conclusion had to callGET /repos/{owner}/{repo}/actions/runsby hand.fj actions runsnow exposes that endpoint, backed by a newfj_core::actions::list_runswrapper thataction_run_logsalso uses instead of reaching forapi.list_action_runsinline.Every filter
ListActionRunsQuerycarries is reachable:--event,--status,--run-number,--head-sha,--ref, and--workflow.--page/--limitride on the request as the generic paging params the endpoint accepts, since the query struct itself has no paging fields.--eventand--statustake a single value each because forgejo-api 0.11.0 comma-joins a repeated query value, which Forgejo rejects forstatusand silently matches nothing forevent; a second value is refused with a message naming that cause rather than sent as a query the server misreads.--jsonemits the run object flattened in unmodified so no field is lost, plusrun_number,head_branch, andconclusionaliases for what Forgejo callsindex_in_repoandprettyrefand folds intostatus. The text renderer follows thetasksline shape, and the status glyph both commands draw is now one sharedstatus_symbolhelper.#FJ-66
`fj actions` could list tasks (one job execution each) but never the workflow-level runs, so a consumer that needs a run's branch, workflow file, or conclusion had to call `GET /repos/{owner}/{repo}/actions/runs` by hand. `fj actions runs` now exposes that endpoint, backed by a new `fj_core::actions::list_runs` wrapper that `action_run_logs` also uses instead of reaching for `api.list_action_runs` inline. Every filter `ListActionRunsQuery` carries is reachable: `--event`, `--status`, `--run-number`, `--head-sha`, `--ref`, and `--workflow`. `--page` / `--limit` ride on the request as the generic paging params the endpoint accepts, since the query struct itself has no paging fields. `--event` and `--status` take a single value each because forgejo-api 0.11.0 comma-joins a repeated query value, which Forgejo rejects for `status` and silently matches nothing for `event`; a second value is refused with a message naming that cause rather than sent as a query the server misreads. `--json` emits the run object flattened in unmodified so no field is lost, plus `run_number`, `head_branch`, and `conclusion` aliases for what Forgejo calls `index_in_repo` and `prettyref` and folds into `status`. The text renderer follows the `tasks` line shape, and the status glyph both commands draw is now one shared `status_symbol` helper. #FJ-66