feat(actions): fetch run logs via forgejo-api REST #77

Merged
Claude-Run merged 1 commit from feat/FJ-22-actions-logs-via-api into main 2026-07-18 20:30:05 +02:00
Member

fj actions logs previously reached Forgejo's web routes with a bespoke reqwest client in fj-client because /api/v1 exposed no action-log endpoint (shipped that way under the earlier duplicate FJ-36). Forgejo 16 now serves the logs over REST and forgejo-api 0.11.0 binds them, so the raw-HTTP workaround is no longer needed and this issue's AC that the fetch go through forgejo-api (not a hand-rolled transport) can be met.

Bump forgejo-api to 0.11.0 across the workspace and reimplement action_run_logs in fj-core as a thin wrapper over the client: resolve the per-repo run number to the run's internal id via list_action_runs(run_number=...) (the job and log endpoints key on the internal id, not the per-repo index), enumerate jobs with list_action_run_jobs, then fetch each job's plaintext log with repo_get_action_job_logs. A job that never started 404s and is treated as an empty log, matching the prior behavior. The binary keeps all rendering and now delegates with the shared Forgejo client instead of host URL plus token.

Remove the fj-client web-route logs module and its re-export; web.rs stays because artifacts and attachments still use it. The 0.11.0 bump adds a CommitStatusState::Skipped variant, so the commit-status renderer gains a skipped arm. Update the stale doc cross-references and the version note that the bump touches.

#FJ-22

Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com

`fj actions logs` previously reached Forgejo's web routes with a bespoke reqwest client in `fj-client` because `/api/v1` exposed no action-log endpoint (shipped that way under the earlier duplicate FJ-36). Forgejo 16 now serves the logs over REST and `forgejo-api` 0.11.0 binds them, so the raw-HTTP workaround is no longer needed and this issue's AC that the fetch go through `forgejo-api` (not a hand-rolled transport) can be met. Bump `forgejo-api` to 0.11.0 across the workspace and reimplement `action_run_logs` in `fj-core` as a thin wrapper over the client: resolve the per-repo run number to the run's internal id via `list_action_runs(run_number=...)` (the job and log endpoints key on the internal id, not the per-repo index), enumerate jobs with `list_action_run_jobs`, then fetch each job's plaintext log with `repo_get_action_job_logs`. A job that never started 404s and is treated as an empty log, matching the prior behavior. The binary keeps all rendering and now delegates with the shared `Forgejo` client instead of host URL plus token. Remove the `fj-client` web-route logs module and its re-export; `web.rs` stays because artifacts and attachments still use it. The 0.11.0 bump adds a `CommitStatusState::Skipped` variant, so the commit-status renderer gains a `skipped` arm. Update the stale doc cross-references and the version note that the bump touches. #FJ-22 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
feat(actions): fetch run logs via forgejo-api REST
All checks were successful
Check / fmt + clippy + build + tests (pull_request) Successful in 42s
Create release / Create release from merged PR (pull_request) Has been skipped
aa9b828624
`fj actions logs` previously reached Forgejo's web routes with a bespoke reqwest client in `fj-client` because `/api/v1` exposed no action-log endpoint (shipped that way under the earlier duplicate FJ-36). Forgejo 16 now serves the logs over REST and `forgejo-api` 0.11.0 binds them, so the raw-HTTP workaround is no longer needed and this issue's AC that the fetch go through `forgejo-api` (not a hand-rolled transport) can be met.

Bump `forgejo-api` to 0.11.0 across the workspace and reimplement `action_run_logs` in `fj-core` as a thin wrapper over the client: resolve the per-repo run number to the run's internal id via `list_action_runs(run_number=...)` (the job and log endpoints key on the internal id, not the per-repo index), enumerate jobs with `list_action_run_jobs`, then fetch each job's plaintext log with `repo_get_action_job_logs`. A job that never started 404s and is treated as an empty log, matching the prior behavior. The binary keeps all rendering and now delegates with the shared `Forgejo` client instead of host URL plus token.

Remove the `fj-client` web-route logs module and its re-export; `web.rs` stays because artifacts and attachments still use it. The 0.11.0 bump adds a `CommitStatusState::Skipped` variant, so the commit-status renderer gains a `skipped` arm. Update the stale doc cross-references and the version note that the bump touches.

#FJ-22

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Run deleted branch feat/FJ-22-actions-logs-via-api 2026-07-18 20:30:05 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
pandoras-box/forgejo-cli!77
No description provided.