neosourceDocs
Search docs

List a repository's workflow definitions

GET/api/repos/{owner}/{repo}/workflows

listRepositoryWorkflows

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/workflows' \
  -H 'Authorization: Bearer $NEOSOURCE_TOKEN'

fetch

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

Path parameters

ownerrequired

Repository owner or organization slug.

string

reporequired

Repository name.

string

Responses

200Workflows

application/json

WorkflowListResponse

object

discovered

array

Inactive GitHub Actions files found in `.github/workflows/`. Usually empty; non-empty means the repo has CI we deliberately do not run.

items

DiscoveredWorkflowResponse

object

A workflow file found in `.github/workflows/` — parsed and reported, but **not registered and never run** (ADR 0073: discover loudly, activate explicitly). neosource runs workflows from `.neosource/workflows/`. An imported GitHub repo whose CI lives in `.github/workflows/` would otherwise get a blank Actions tab with no explanation; these entries are that explanation, and they double as a pre-flight check — the diagnostics are produced by the same parser that would run the file if it were activated.

namerequired

string

The workflow's declared `name:`, for display. Falls back to the file name when the file could not be parsed.

parsedrequired

boolean

`false` when the file failed to parse entirely — the single `severity: "error"` entry in `warnings` says why. `true` with a non-empty `warnings` means it parsed, but parts of it were ignored. "Would run as-is if activated" is `parsed && warnings.is_empty()`.

pathrequired

string

Repo-relative path, e.g. `.github/workflows/ci.yml`.

warningsrequired

array

The diagnostics this file would produce if it were activated — unsupported keys (`container:`), unsupported triggers, and so on.

workflowsrequired

array

Registered, dispatchable workflows (from `.neosource/workflows/`).

items

WorkflowResponse

object

created_atrequired

integerint64

idrequired

string

namerequired

string

The `name:` declared in the workflow YAML, for display. A file that failed to parse is named after itself (e.g. `broken.yml`), so this is always something showable. This is the **only** projection of the parsed definition on the wire. The full `WorkflowDef` used to be returned here and reached ~100 KB per request on a real repo while every client read just the name; the runner gets definitions through the job-claim path, not this listing.

pathrequired

string

repo_idrequired

string

source_operationrequired

string

updated_atrequired

integerint64

warningsrequired

array

Parse diagnostics recorded when the file was indexed: unknown GHA keys / unsupported triggers ignored with `severity: "warning"`, or a whole-file parse failure as `severity: "error"` (such a workflow is stored inert — no triggers, no jobs — and never runs). Empty when the file parsed clean.

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

Schemas

Referenced above. Listed here rather than expanded inline, so the same definition is not repeated at every level.

WorkflowWarning

object

A non-fatal diagnostic collected while parsing workflow YAML. GHA's own forward-compat posture: a valid-but-unmodeled key (`permissions:`, `concurrency:`, `defaults:`, …) must not fail the whole file — it is ignored and reported. Persisted alongside the indexed workflow (`workflows.warnings`) so the API/UI can surface "this workflow has warnings / failed to parse" instead of the file silently ceasing to exist.

locationrequired

string

Where in the document: `workflow`, `on.push`, `job 'build'`, `job 'build' step 2 ('Deploy')`, …

messagerequired

string

severityrequired

WorkflowWarningSeverity

string

Severity of a [`WorkflowWarning`].

"warning""error"