fix(ci): gitea_ci status/jobs/run print raw JSON or a bare job name instead of run status #26
Labels
No labels
area/dsh
area/forgejo
experiment
priority/later
priority/next
priority/now
type/bug
type/task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
dsh-plugins/dsh-gitea#26
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?
Symptom
The CI tools have no output formatters, so the whole domain is hard to read:
gitea_ci statusdumps a rawworkflow_runsJSON blob,gitea_ci jobsprints only the job name, andgitea_ci runprints the title plus raw JSON. Status/conclusion, branch, SHA and URLs are not surfaced.Repro
Observed vs expected
#74 docs: ... [success] master abc1234 (url); observed raw JSON.check: successper job; observed onlycheck.Root cause
lib/tool-defs/releases.js/lib/handlers/releases.jsroutegitea_cithrough the generic wrapper, andlib/handlers/formatters.jshas nogitea_cicase (unlikegitea_ci_logs_analyze). Array rows fall back toitem.name(jobs) orclipSnippet(runs); the run object falls back todescribeUnknownObject.Proposed fix
Add
gitea_ciformatters keyed by action (status/jobs/run/logs) with run/job ids, status/conclusion, branch, short SHA and links; keeplogs/explainoutput readable. Add formatter tests with the recorded payloads.Acceptance:
status,jobsandruneach produce a human-readable summary with status/conclusion and ids; noUnrecognised responseand no raw JSON.Duplicate check
Searched
ci,actions,formatter(state all) — #12 was the publish workflow change; no CI-output issue exists.Layer
dsh-gitea plugin/tool (formatter).
Fixed in
56f41de(PR #41) plusfbcef26(PR #42).status→ one line per run:#77 title [success] branch sha+ URL.jobs→CI Jobs (N): #78 check [success]. Forgejo returns a bareActionRunJob[]; the follow-up handles that shape (the first patch only covered{jobs}/{workflow_jobs}).run→ id/title/state/branch/SHA/URL + job summary.No CI runs.Live:
statusreadable;run 77readable;jobs 77→CI Jobs (1): #78 check [success].Tests:
test/qa-formatters.test.mjs.