Feature Request
Add commands for monitoring and inspecting Forgejo Actions workflow runs from the CLI.
Motivation
Currently there's no way to check CI/Actions status from fj. When debugging CI failures, you have to open the browser, navigate to the run, expand each step, and read logs manually. This is especially painful when iterating on workflow fixes (as we experienced getting our CI pipeline working on Codeberg runners).
Proposed commands
fj actions runs list # list recent workflow runs (status, duration, commit)
fj actions runs view <run-id> # show run details with step-by-step status/timing
fj actions runs logs <run-id> # stream or dump logs for a run/job/step
fj actions runs watch <run-id> # poll a running job until completion
fj actions runs rerun <run-id> # re-trigger a failed run
fj actions runs cancel <run-id> # cancel a running job
Available API endpoints
Verified against the Forgejo source (routers/api/v1/repo/action.go and routers/web/repo/actions/view.go):
REST API (/api/v1):
- GET /repos/{owner}/{repo}/actions/runs - List runs (filterable by event, status, ref, workflow_id)
- GET /repos/{owner}/{repo}/actions/runs/{run_id} - Get a specific run
- GET /repos/{owner}/{repo}/actions/runners/jobs - Search for run jobs (filterable by labels)
- GET /repos/{owner}/{repo}/actions/tasks - List action tasks
Web-only routes (no REST API equivalent):
- GET /:owner/:repo/actions/runs/{run}/jobs/{job}/attempt/{attempt}/logs - Download job logs (file attachment)
- POST /:owner/:repo/actions/runs/{run}/jobs/{job}/rerun - Rerun a specific job
- POST /:owner/:repo/actions/runs/{run}/cancel - Cancel a run
Implementation notes
- Job logs have no REST API endpoint. Logs are only available via the web route as a file download. The CLI will need to hit the web route directly (with auth cookie or token) or we could propose an API endpoint upstream.
- Rerun/cancel are also web-only. Same situation applies.
- Run listing supports pagination (page, limit) and rich filtering (event[], status[], run_number, head_sha, ref, workflow_id).
- Status values: unknown, waiting, running, success, failure, cancelled, skipped, blocked.
Prior art
- gh run list, gh run view, gh run watch from GitHub CLI
- tea CLI has no Actions support yet
## Feature Request
Add commands for monitoring and inspecting Forgejo Actions workflow runs from the CLI.
### Motivation
Currently there's no way to check CI/Actions status from `fj`. When debugging CI failures, you have to open the browser, navigate to the run, expand each step, and read logs manually. This is especially painful when iterating on workflow fixes (as we experienced getting our CI pipeline working on Codeberg runners).
### Proposed commands
```
fj actions runs list # list recent workflow runs (status, duration, commit)
fj actions runs view <run-id> # show run details with step-by-step status/timing
fj actions runs logs <run-id> # stream or dump logs for a run/job/step
fj actions runs watch <run-id> # poll a running job until completion
fj actions runs rerun <run-id> # re-trigger a failed run
fj actions runs cancel <run-id> # cancel a running job
```
### Available API endpoints
Verified against the [Forgejo source](https://codeberg.org/forgejo/forgejo) (routers/api/v1/repo/action.go and routers/web/repo/actions/view.go):
**REST API (/api/v1):**
- GET /repos/{owner}/{repo}/actions/runs - List runs (filterable by event, status, ref, workflow_id)
- GET /repos/{owner}/{repo}/actions/runs/{run_id} - Get a specific run
- GET /repos/{owner}/{repo}/actions/runners/jobs - Search for run jobs (filterable by labels)
- GET /repos/{owner}/{repo}/actions/tasks - List action tasks
**Web-only routes (no REST API equivalent):**
- GET /:owner/:repo/actions/runs/{run}/jobs/{job}/attempt/{attempt}/logs - Download job logs (file attachment)
- POST /:owner/:repo/actions/runs/{run}/jobs/{job}/rerun - Rerun a specific job
- POST /:owner/:repo/actions/runs/{run}/cancel - Cancel a run
### Implementation notes
- Job logs have no REST API endpoint. Logs are only available via the web route as a file download. The CLI will need to hit the web route directly (with auth cookie or token) or we could propose an API endpoint upstream.
- Rerun/cancel are also web-only. Same situation applies.
- Run listing supports pagination (page, limit) and rich filtering (event[], status[], run_number, head_sha, ref, workflow_id).
- Status values: unknown, waiting, running, success, failure, cancelled, skipped, blocked.
### Prior art
- gh run list, gh run view, gh run watch from GitHub CLI
- tea CLI has no Actions support yet