Add Forgejo CI tools: commit status, run jobs, job and run logs #76
No reviewers
Labels
No labels
Agent
Ignore
Agent
In Progress
Agent
Planned
Agent
Planning
Agent
Ready
Agent
Triage
Compat
Breaking
Kind
Bug
Kind
Documentation
Kind
Enhancement
Kind
Feature
Kind
Security
Kind
Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
lucas/omp-deck!76
Loading…
Reference in a new issue
No description provided.
Delete branch "agent/issue-74-ci-tools"
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?
Closes: #74
Adds four read-only CI tools (step 16 of the integration plan):
forgejo_read_commit_status: the combined state, whether every check has finished, and one line per check. Each Actions check's run number is resolved to its API run id throughGET /actions/runs?run_number=N.forgejo_list_run_jobs: the run header plus one line per job.forgejo_read_job_log: snapshots the log tolocal://ci/job-<id>-attempt-<n>.logand returns the last 50 lines inline, capped at 5 KB.forgejo_get_run_logs: downloads the run's log ZIP through the newForgejoClient.bytes(), unpacks it withfflate, and writes the logs tolocal://ci/run-<id>/. The unpacked size is capped at 256 MB.The tools are also added to the conversation, pull-request and implementer policies, with a CI bullet in each one's system context. Each tool has its own web card, plus preview fixtures and docs.
Deviations from the plan
.partialsibling marker, and only unmarked snapshots are reused. A mock-server smoke run caught this bug."allow", not"default". The new session-policy test accepts either result, since neither prompts.Verified
workflow_runsagainst the instance's swagger (ListActionRunResponse).ci.test.tscovers the pure helpers:parseActionsTarget,logTail,zipEntryNameandextractRunLogs.bun test apps/server/src/forgejo apps/server/src/bridge: 696 pass.bun run typecheckis clean.Not verified
target_urlformat (assumed/actions/runs/<index_in_repo>/jobs/<n>), whether therun_numberfilter is honoured (the code checksindex_in_repo === Nand leaves the run id null on a mismatch), and how the job-log endpoint behaves while a job is running.