Spike: Forgejo Actions API coverage on our instance #1
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Problem
The Actions box ([3]), the Logs tab and the
R(re-run) key all depend on what the Forgejo API exposes for Actions on our instance (git.bobparsons.dev). We knowfjcan't re-run a job or fetch logs, which suggests gaps. Designing those features before knowing what's available risks building UI for data we can't get.Plan
Time-boxed investigation (half a day). Against the deployed Forgejo version, with a read-scoped token:
/api/v1/version)./api/swagger), call it on a real repo with runs, and save a trimmed sample response:oopens the web page.Deliverable
A comment on this ticket with a table: operation → endpoint (or "missing") → sample saved at → fallback. Samples committed under
internal/forge/gitea/testdata/actions/so the adapter's tests can use them later.Context
docs/architecture.md→ "API mapping", where the Forgejo Actions rows are marked "⚠ check".docs/design.md→ boxes table:[3] Actions, Logs tab,Rkey.forge.RunLister,forge.LogReader,forge.Rerunner). This spike decides which ones the gitea adapter can implement.fjcannot re-run jobs or fetch logs; raw logs live zstd-compressed inside the Forgejo container, which lazyforge can't use.Out of scope
Writing adapter code.
🤖 Spike result. Forgejo
16.0.5+gitea-1.22.0. Samples ininternal/forge/gitea/testdata/actions/onspike/1-actions-api(1b9db17; MR to follow once SSH on :2222 is back).event,status,head_sha,workflow_id,run_number,ref— full ref only)GET /repos/{o}/{r}/actions/runsruns_list.jsonGET …/actions/runs/{run_id}run_get.jsonGET …/actions/runs/{run_id}/jobs(bare array, no pagination)run_jobs.jsonGET …/actions/jobs/{job_id}/logs(text/plain,Rangesupported)job_log.txtR;oopens the run pageGET …/commits/{sha}/status(combinedstate)commit_status_combined_*.jsonEngineering notes for #6:
RunListerandLogReader: implementable.Rerunner: not on Forgejo 16.limitis ignored unlesspageis sent; page cap 50; response{workflow_runs,total_count}, noX-Total-Count.status(noconclusion),index_in_repo,prettyref,commit_sha,workflow_id= file name. API routes take the global runid; web URLs use the per-repo index.id, nottask_id. Skipped jobs (attempt:0) have no log (404).target_urlis a relative path; prefix the host.Product consequence: with no re-run API, item 12 on #13 recommendation (a) stands — no
Rin v1 on Forgejo.