Docs
Search docs

Statuses of a repository's newest workflow runs

GET/api/repos/{owner}/{repo}/workflow-runs/activity

getRepositoryWorkflowRunActivity

The statuses of the ten newest runs, newest first — the same runs `workflow-runs?limit=10` lists, as one enum each. For a client that only needs to know whether CI is busy.

Authentication optional — this operation also accepts anonymous requests. When authenticating, use a bearer token or a session cookie.

curl

curl -X GET 'https://neosource.dev/api/repos/OWNER/REPO/workflow-runs/activity' \
  -H 'Authorization: Bearer $NEOSOURCE_TOKEN'

fetch

fetch("https://neosource.dev/api/repos/OWNER/REPO/workflow-runs/activity", {
  method: "GET",
  headers: {
    Authorization: "Bearer $NEOSOURCE_TOKEN",
  },
});

Path parameters

ownerrequired

Repository owner or organization slug.

string

reporequired

Repository name.

string

Responses

200Recent run statuses

application/json

WorkflowRunActivityResponse

object

`GET /api/repos/{owner}/{repo}/workflow-runs/activity` — whether CI is busy, for the Actions-tab glyph every repo page shows (ADR 0128 §5). Statuses only. The glyph asks one question of the newest runs — is any non-terminal, and is any of those running — so it gets the statuses and nothing else, rather than ten full [`WorkflowRunResponse`]s it reads one field of.

recent_statusesrequired

array

Statuses of the repository's newest runs (at most ten), newest first — the same runs `GET …/workflow-runs?limit=10` returns, in its order.

items

WorkflowRunStatus

string

Lifecycle of a workflow run. Mirrors the GHA-shaped surface that the SPA renders. The serde `snake_case` strings are the wire vocabulary the API emits (pinned by the `enum_wire_consistency` tests).

"pending_approval""queued""quota_blocked""concurrency_blocked""running""cancelling""succeeded""failed""cancelled"

Standard errors

Bodies documented once for the whole API — see standard errors.

  • 400Bad Request — one of: invalid_input
  • 403Forbidden — one of: forbidden
  • 404Not Found — one of: not_found
  • 423Locked — one of: busy
  • 429Rate limited — retry after the `Retry-After` header
  • 500Internal server error
  • 503Service temporarily unavailable / at capacity — retry after the `Retry-After` header
  • 504Gateway timeout — the request exceeded the server's handling budget