Skip to content

GitHub: List workflow runs for a repository

GitHub actions.actionsListWorkflowRunsForRepo: arguments, response, policy and SDK examples.

← Actions operations · Get started

Operation github.actions_list_workflow_runs_for_repo

Provider route: GET /repos/{owner}/{repo}/actions/runs. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/github with npm, or alter-sdk-github with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { GitHubIntegration } from "@alter-ai/github";
async function execute(input: Parameters<GitHubIntegration["actions"]["actionsListWorkflowRunsForRepo"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new GitHubIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.actions.actionsListWorkflowRunsForRepo(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_github import GitHubIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = GitHubIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.actions.actions_list_workflow_runs_for_repo(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.ownerstringRequired within parent
path.repostringRequired within parent
queryModelOptionalExpand List workflow runs for a workflow — request body — query

Referenced models: List workflow runs for a workflow — request body — query

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$objectRoot
total_countJSONRequired within parent
total_count (anyOf 1)integerAlternative
total_count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
workflow_runsarrayRequired within parent
workflow_runs[]ModelEach itemExpand Get a workflow run — response body

Referenced models: Get a workflow run — response body

6 more schemas are linked from the tables above, on the schema pages.

Get a workflow run — response body
FieldTypePresenceDescription and constraints
$objectRootAn invocation of a workflow
actorModelOptionalExpand List users — response body — item
artifacts_urlstringRequired within parentThe URL to the artifacts for the workflow run.
cancel_urlstringRequired within parentThe URL to cancel the workflow run.
check_suite_idJSONOptional
check_suite_id (anyOf 1)integerAlternativeThe ID of the associated check suite.
Format: int64
check_suite_id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
check_suite_node_idstringOptionalThe node ID of the associated check suite.
check_suite_urlstringRequired within parentThe URL to the associated check suite.
conclusionJSONRequired within parent
conclusion (anyOf 1)stringAlternative
conclusion (anyOf 2)nullAlternative
created_atstringRequired within parentFormat: date-time
display_titlestringRequired within parentThe event-specific title associated with the run or the run-name if set, or the value of `run-name` if it is set in the workflow.
eventstringRequired within parent
head_branchJSONRequired within parent
head_branch (anyOf 1)stringAlternative
head_branch (anyOf 2)nullAlternative
head_commitModelRequired within parentExpand Get a workflow run — response body — head commit
head_repositoryModelRequired within parentExpand Transfer a repository — response body
head_repository_idJSONOptional
head_repository_id (anyOf 1)integerAlternative
head_repository_id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
head_shastringRequired within parentThe SHA of the head commit that points to the version of the workflow being run.
html_urlstringRequired within parent
idJSONRequired within parent
id (anyOf 1)integerAlternativeThe ID of the workflow run.
Format: int64
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
jobs_urlstringRequired within parentThe URL to the jobs for the workflow run.
logs_urlstringRequired within parentThe URL to download the logs for the workflow run.
nameJSONOptional
name (anyOf 1)stringAlternativeThe name of the workflow run.
name (anyOf 2)nullAlternative
node_idstringRequired within parent
pathstringRequired within parentThe full path of the workflow
previous_attempt_urlJSONOptional
previous_attempt_url (anyOf 1)stringAlternativeThe URL to the previous attempted run of this workflow, if one exists.
previous_attempt_url (anyOf 2)nullAlternative
pull_requestsJSONRequired within parent
pull_requests (anyOf 1)arrayAlternativePull requests that are open with a `head_sha` or `head_branch` that matches the workflow run. The returned pull requests do not necessarily indicate pull requests that triggered the run.
pull_requests (anyOf 1)[]ModelEach itemExpand Get a check run — response body — pull requests item
pull_requests (anyOf 2)nullAlternative
referenced_workflowsJSONOptional
referenced_workflows (anyOf 1)arrayAlternative
referenced_workflows (anyOf 1)[]ModelEach itemExpand Get a workflow run — response body — referenced workflows array item
referenced_workflows (anyOf 2)nullAlternative
repositoryModelRequired within parentExpand Transfer a repository — response body
rerun_urlstringRequired within parentThe URL to rerun the workflow run.
run_attemptJSONOptional
run_attempt (anyOf 1)integerAlternativeAttempt number of the run, 1 for first attempt and higher if the workflow was re-run.
run_attempt (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
run_numberJSONRequired within parent
run_number (anyOf 1)integerAlternativeThe auto incrementing run number for the workflow run.
run_number (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
run_started_atstringOptionalThe start time of the latest run. Resets on re-run.
Format: date-time
statusJSONRequired within parent
status (anyOf 1)stringAlternative
status (anyOf 2)nullAlternative
triggering_actorModelOptionalExpand List users — response body — item
updated_atstringRequired within parentFormat: date-time
urlstringRequired within parentThe URL to the workflow run.
workflow_idJSONRequired within parent
workflow_id (anyOf 1)integerAlternativeThe ID of the parent workflow.
workflow_id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
workflow_urlstringRequired within parentThe URL to the workflow.

Referenced models: Transfer a repository — response body, Get a workflow run — response body — head commit, Get a check run — response body — pull requests item, Get a workflow run — response body — referenced workflows array item, List users — response body — item

List workflow runs for a workflow — request body — query
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
actorstringOptional
branchstringOptional
eventstringOptional
statusstringOptionalOne of: completed, action_required, cancelled, failure, neutral, skipped, stale, success, timed_out, in_progress, queued, requested, waiting, pending
per_pageintegerOptionalDefault: 30
pageintegerOptionalDefault: 1
createdstringOptionalFormat: date-time
exclude_pull_requestsbooleanOptionalDefault: false
check_suite_idintegerOptionalFormat: int64
head_shastringOptional
Get a workflow run — response body — head commit
FieldTypePresenceDescription and constraints
$JSONRoot
$ (anyOf 1)ModelAlternativeExpand Get a workflow run — response body — head commit A commit
$ (anyOf 2)nullAlternative

Referenced models: Get a workflow run — response body — head commit A commit

Get a check run — response body — pull requests item
FieldTypePresenceDescription and constraints
$objectRoot
baseobjectRequired within parent
base.refstringRequired within parent
base.repoobjectRequired within parent
base.repo.idJSONRequired within parent
base.repo.id (anyOf 1)integerAlternativeFormat: int64
base.repo.id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
base.repo.namestringRequired within parent
base.repo.urlstringRequired within parent
base.shastringRequired within parent
headobjectRequired within parent
head.refstringRequired within parent
head.repoobjectRequired within parent
head.repo.idJSONRequired within parent
head.repo.id (anyOf 1)integerAlternativeFormat: int64
head.repo.id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
head.repo.namestringRequired within parent
head.repo.urlstringRequired within parent
head.shastringRequired within parent
idJSONRequired within parent
id (anyOf 1)integerAlternativeFormat: int64
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
numberJSONRequired within parent
number (anyOf 1)integerAlternative
number (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
urlstringRequired within parent

SDK function policy ID: github.actions_list_workflow_runs_for_repo. Catalog operation: actions/list-workflow-runs-for-repo. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Pinned headers: {"X-GitHub-Api-Version": "2026-03-10", "User-Agent": "Alter", "Accept": "application/vnd.github+json"}

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.