GitHub adapter: runs, job logs and labels #85
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
A GitHub session has no Actions box data, no logs, and no label editing until the adapter implements the optional capabilities. Parent: #83. Depends on #84 (the
internal/forge/githubpackage); pick this up after #84 merges.Acceptance criteria
forge.RunLister,forge.LogReaderandforge.Labeler, so[3]Actions lists runs,Ropens a run's page, and labels can be edited, as on Forgejo (design.md → Boxes[3]; KeymapR; ADR 0006 capabilities).status+conclusioninto the sameCIStatevalues as #84's check-run fold.Plan
In
internal/forge/github, following the client from #84:ListRuns:GET …/actions/runs(branch,head_shafilters; body{total_count, workflow_runs},Linkpaging). Field mapping:ID←id,Number←run_number,Workflow←name,Title←display_title,Branch←head_branch,Commit←head_sha,Event←event,StartedAt←run_started_at,Duration←updated_at − run_started_atonce completed,WebURL←html_url.completedusesconclusion. Otherwisein_progress→ running, andqueued,waiting,requestedandpending→ pending.ListJobs:GET …/actions/runs/{id}/jobs(paginated{total_count, jobs}),Attempt←run_attempt.JobLog:GET …/actions/jobs/{id}/logs, a 302 to a signed URL on another host. Go dropsAuthorizationon a cross-host redirect. Add a test that proves the token isn't sent to the redirect target.Labeler:ListLabels←GET …/labels,ItemLabels←GET …/issues/{n}/labels,SetLabels→PUT …/issues/{n}/labelswith{labels: [names]}, mapping the IDs to names throughListLabels(an unknown ID is an error). GitHub colors are hex without#, so match the format the gitea adapter handsdomain.Label.Color.gh api(runs, jobs, labels), plus a log fixture as ingitea/testdata/actions/.Context
internal/forge/gitea/actions.go,labels.go. Capabilities:internal/forge/forge.go.architecture.mdAPI table GitHub column lists these endpoints, unverified until this ticket.Out of scope
Re-run (
Rerunnerstays undefined, ADR 0006). The Logs tab UI (post-v1).🤖 merged: #89