Expand description
Saved GitHub Actions API responses.
--runs DIR reads runs-*.json (a GET /repos/{owner}/{repo}/actions/runs
body) and jobs-<run_id>*.json (a
GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs?filter=all body).
Several files are pages of one list. Only files directly in the directory
are read. Bodies from attempts/{n}/jobs are a different list and are
not mixed in.
repo.json in that directory is the GET /repos/{owner}/{repo} body.
private: false marks the repository public. A missing file, or a missing
private field, leaves the repository billed at list price.
A run path is stored so it matches a CSV workflow_path: the @ref
suffix (including @refs/heads/...) and an owner/repo/ prefix are removed.
head_branch and pull_requests[].number are kept when present so two runs
of one workflow can be compared on the same branch or pull request.
Structs§
- ApiData
- Runs and jobs loaded from one directory.
- ApiError
- The runs directory or one JSON file could not be read. Exit code 2.
- Job
- One job from
jobs[]. - Workflow
Run - One workflow run from
workflow_runs[].
Constants§
- IN_
PROGRESS - Phrase used when a job has not finished.
- UNKNOWN_
WORKFLOW - Workflow path used when a job has no matching run record.
Functions§
- linked_
workflow_ path - Drop
@refand anowner/repo/prefix so a run path matches a CSV workflow path. - parse_
jobs - Parse one
jobspage body, the same wayread_dirparses eachjobs-*.jsonfile. - parse_
runs - Parse one
workflow_runspage body, the same wayread_dirparses eachruns-*.jsonfile. - read_
dir - Read every runs page and
jobs?filter=allpage indir. - repository_
from_ run_ path owner/repofrom a raw Actions run path, before@refand the workflow prefix are removed.- workflow_
paths_ match - Both paths refer to the same workflow file after linking.