Skip to content

GitHub: Update a check run

GitHub checks.checksUpdate: arguments, response, policy and SDK examples.

← Checks operations · Get started

Operation github.checks_update

Provider route: PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}. 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["checks"]["checksUpdate"]>[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.checks.checksUpdate(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.checks.checks_update(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
path.check_run_idintegerRequired within parentFormat: int64
bodyobjectRequired within parent
body.actionsarrayOptionalPossible further actions the integrator can perform, which a user may trigger. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. To learn more about check runs and requested actions, see “[Check runs and requested actions](https://docs.github.com/rest/guides/using-the-rest-api-to-interact-with-checks#check-runs-and-requested-actions).”
Maximum items: 3
body.actions[]ModelEach itemExpand Create a check run — request body — body actions item
body.completed_atstringOptionalThe time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.
Format: date-time
body.conclusionstringOptionalRequired if you provide `completed_at` or a `status` of `completed`. The final conclusion of the check.
Note: Providing `conclusion` will automatically set the `status` parameter to `completed`. You cannot change a check run conclusion to `stale`, only GitHub can set this.
One of: action_required, cancelled, failure, neutral, success, skipped, stale, timed_out
body.details_urlstringOptionalThe URL of the integrator’s site that has the full details of the check.
body.external_idstringOptionalA reference for the run on the integrator’s system.
body.namestringOptionalThe name of the check. For example, “code-coverage”.
body.outputobjectOptionalCheck runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run.
body.output.annotationsarrayOptionalAdds information from your analysis to specific lines of code. Annotations are visible in GitHub’s pull request UI. Annotations are visible in GitHub’s pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/checks/runs#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. GitHub Actions are limited to 10 warning annotations and 10 error annotations per step. For details about annotations in the UI, see “[About status checks](https://docs.github.com/articles/about-status-checks#checks)”.
Maximum items: 50
body.output.annotations[]ModelEach itemExpand Create a check run — request body — body output annotations item
body.output.imagesarrayOptionalAdds images to the output displayed in the GitHub pull request UI.
body.output.images[]objectEach item
body.output.images[].altstringRequired within parentThe alternative text for the image.
body.output.images[].captionstringOptionalA short image description.
body.output.images[].image_urlstringRequired within parentThe full URL of the image.
body.output.summarystringRequired within parentCan contain Markdown.
Maximum length: 65535
body.output.textstringOptionalCan contain Markdown.
Maximum length: 65535
body.output.titlestringOptionalRequired.
body.started_atstringOptionalThis is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.
Format: date-time
body.statusstringOptionalThe current status of the check run. Only GitHub Actions can set a status of `waiting`, `pending`, or `requested`.
One of: queued, in_progress, completed, waiting, requested, pending
body (anyOf 1)JSONAlternativeAdditional keys: allowed
body (anyOf 1).statusJSONOptionalOne of: completed
body (anyOf 2)JSONAlternativeAdditional keys: allowed
body (anyOf 2).statusJSONOptionalOne of: queued, in_progress

Referenced models: Create a check run — request body — body actions item, Create a check run — request body — body output annotations item

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

FieldTypePresenceDescription and constraints
$ModelRootExpand Get a check run — response body

Referenced models: Get a check run — response body

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

Get a check run — response body
FieldTypePresenceDescription and constraints
$objectRootA check performed on the code of a given code change
appModelRequired within parentExpand Get an app — response body
check_suiteJSONRequired within parent
check_suite (anyOf 1)objectAlternative
check_suite (anyOf 1).idJSONRequired within parent
check_suite (anyOf 1).id (anyOf 1)integerAlternative
check_suite (anyOf 1).id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
check_suite (anyOf 2)nullAlternative
completed_atJSONRequired within parent
completed_at (anyOf 1)stringAlternativeFormat: date-time
completed_at (anyOf 2)nullAlternative
conclusionJSONRequired within parent
conclusion (anyOf 1)stringAlternativeKnown values: success, failure, neutral, cancelled, skipped, timed_out, action_required
conclusion (anyOf 2)nullAlternative
deploymentModelOptionalExpand Get a check run — response body — deployment
details_urlJSONRequired within parent
details_url (anyOf 1)stringAlternative
details_url (anyOf 2)nullAlternative
external_idJSONRequired within parent
external_id (anyOf 1)stringAlternative
external_id (anyOf 2)nullAlternative
head_shastringRequired within parentThe SHA of the commit that is being checked.
html_urlJSONRequired within parent
html_url (anyOf 1)stringAlternative
html_url (anyOf 2)nullAlternative
idJSONRequired within parent
id (anyOf 1)integerAlternativeThe id of the check.
Format: int64
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
namestringRequired within parentThe name of the check.
node_idstringRequired within parent
outputobjectRequired within parent
output.annotations_countJSONRequired within parent
output.annotations_count (anyOf 1)integerAlternative
output.annotations_count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
output.annotations_urlstringRequired within parentFormat: uri
output.summaryJSONRequired within parent
output.summary (anyOf 1)stringAlternative
output.summary (anyOf 2)nullAlternative
output.textJSONRequired within parent
output.text (anyOf 1)stringAlternative
output.text (anyOf 2)nullAlternative
output.titleJSONRequired within parent
output.title (anyOf 1)stringAlternative
output.title (anyOf 2)nullAlternative
pull_requestsarrayRequired within parentPull requests that are open with a `head_sha` or `head_branch` that matches the check. The returned pull requests do not necessarily indicate pull requests that triggered the check.
pull_requests[]ModelEach itemExpand Get a check run — response body — pull requests item
started_atJSONRequired within parent
started_at (anyOf 1)stringAlternativeFormat: date-time
started_at (anyOf 2)nullAlternative
statusstringRequired within parentThe phase of the lifecycle that the check is currently in. Statuses of waiting, requested, and pending are reserved for GitHub Actions check runs.
Known values: queued, in_progress, completed, waiting, requested, pending
urlstringRequired within parent

Referenced models: Get a check run — response body — deployment, Get an app — response body, Get a check run — response body — pull requests item

Create a check run — request body — body actions item
FieldTypePresenceDescription and constraints
$objectRoot
descriptionstringRequired within parentA short explanation of what this action would do. The maximum size is 40 characters.
Maximum length: 40
identifierstringRequired within parentA reference for the action on the integrator's system. The maximum size is 20 characters.
Maximum length: 20
labelstringRequired within parentThe text to be displayed on a button in the web UI. The maximum size is 20 characters.
Maximum length: 20
Create a check run — request body — body output annotations item
FieldTypePresenceDescription and constraints
$objectRoot
annotation_levelstringRequired within parentThe level of the annotation.
One of: notice, warning, failure
end_columnintegerOptionalThe end column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values.
end_lineintegerRequired within parentThe end line of the annotation.
messagestringRequired within parentA short description of the feedback for these lines of code. The maximum size is 64 KB.
pathstringRequired within parentThe path of the file to add an annotation to. For example, `assets/css/main.css`.
raw_detailsstringOptionalDetails about this annotation. The maximum size is 64 KB.
start_columnintegerOptionalThe start column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. Column numbers start at 1.
start_lineintegerRequired within parentThe start line of the annotation. Line numbers start at 1.
titlestringOptionalThe title that represents the annotation. The maximum size is 255 characters.
Get a check run — response body — deployment
FieldTypePresenceDescription and constraints
$objectRootA deployment created as the result of an Actions check run from a workflow that references an environment
created_atstringRequired within parentFormat: date-time
descriptionJSONRequired within parent
description (anyOf 1)stringAlternative
description (anyOf 2)nullAlternative
environmentstringRequired within parentName for the target deployment environment.
idJSONRequired within parent
id (anyOf 1)integerAlternativeUnique identifier of the deployment
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
node_idstringRequired within parent
original_environmentstringOptional
performed_via_github_appModelOptionalExpand Get an app — response body
production_environmentbooleanOptionalSpecifies if the given environment is one that end-users directly interact with. Default: false.
repository_urlstringRequired within parentFormat: uri
statuses_urlstringRequired within parentFormat: uri
taskstringRequired within parentParameter to specify a task to execute
transient_environmentbooleanOptionalSpecifies if the given environment is will no longer exist at some point in the future. Default: false.
updated_atstringRequired within parentFormat: date-time
urlstringRequired within parentFormat: uri

Referenced models: Get an app — response body

Get an app — response body — client id, created at, description, events, external url, html url, id, installations count, name, node id, owner, permissions, slug, updated at owner Enterprise
FieldTypePresenceDescription and constraints
$objectRootAn enterprise on GitHub.
avatar_urlstringRequired within parentFormat: uri
created_atJSONRequired within parent
created_at (anyOf 1)stringAlternativeFormat: date-time
created_at (anyOf 2)nullAlternative
descriptionJSONOptional
description (anyOf 1)stringAlternativeA short description of the enterprise.
description (anyOf 2)nullAlternative
html_urlstringRequired within parentFormat: uri
idJSONRequired within parent
id (anyOf 1)integerAlternativeUnique identifier of the enterprise
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
namestringRequired within parentThe name of the enterprise.
node_idstringRequired within parent
slugstringRequired within parentThe slug url identifier for the enterprise.
updated_atJSONRequired within parent
updated_at (anyOf 1)stringAlternativeFormat: date-time
updated_at (anyOf 2)nullAlternative
website_urlJSONOptional
website_url (anyOf 1)stringAlternativeThe enterprise's website URL.
Format: uri
website_url (anyOf 2)nullAlternative

SDK function policy ID: github.checks_update. Catalog operation: checks/update. 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.