📝 docs(gitea): clarify failing job log lookup

This commit is contained in:
csh
2026-07-07 16:46:42 +08:00
parent 6f94cd3ee4
commit 16e0992dd2
+5 -2
View File
@@ -83,8 +83,11 @@ Gitea API from the current workspace.
- `GET /api/v1/repos/<owner>/<repo>/actions/jobs/<job_id>/logs`
- On Gitea 1.21 web fallback, download logs by UI job index:
- `GET /<owner>/<repo>/actions/runs/<run>/jobs/<job-index>/logs`
- Start with job index `0`; if multiple jobs exist, inspect the run page or
downloaded logs to map the failing job.
- First open the run page and read each job's status; take the index of a
job whose status is `failure`, not index `0` by default. The failing job
is rarely the first one, so a blind index `0` usually returns a passing
job's log. Only fall back to scanning indices when the run page does not
expose per-job status.
- Save large logs to a temporary file outside tracked source paths.
- Extract the first actionable error block, surrounding command, job name,
workflow name, run URL, branch, and SHA.