Sample - GitHub REST API
PATCH/repos/{owner}/{repo}/check-runs/{check_run_id}

Update a check run

Updates a check run for a specific commit in a repository.

[!NOTE] The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty pull_requests array.

OAuth apps and personal access tokens (classic) cannot use this endpoint.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

3 parameters · 9 body fields
ownerstringrequired
The account owner of the repository. The name is not case sensitive.
repostringrequired
The name of the repository without the `.git` extension. The name is not case sensitive.
check_run_idintegerrequired
The unique identifier of the check run.
namestringoptional
The name of the check. For example, "code-coverage".
details_urlstringoptional
The URL of the integrator's site that has the full details of the check.
external_idstringoptional
A reference for the run on the integrator's system.
started_atstringoptional
This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.
statusstringoptional
The current status of the check run. Only GitHub Actions can set a status of `waiting`, `pending`, or `requested`.
Allowed:queuedin_progresscompletedwaitingrequestedpending
conclusionstringrequired
**Required 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.
Allowed:action_requiredcancelledfailureneutralsuccessskippedstaletimed_out
completed_atstringoptional
The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.
outputobjectoptional
Check 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.
actionsarray<object>optional
Possible 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)."

1 status code
200Response
idintegerrequired
The id of the check.
head_shastringrequired
The SHA of the commit that is being checked.
node_idstringrequired
external_idstringrequired
urlstringrequired
html_urlstringrequired
details_urlstringrequired
statusstringrequired
The phase of the lifecycle that the check is currently in. Statuses of waiting, requested, and pending are reserved for GitHub Actions check runs.
Allowed:queuedin_progresscompletedwaitingrequestedpending
conclusionstringrequired
Allowed:successfailureneutralcancelledskippedtimed_outaction_required
started_atstringrequired
completed_atstringrequired
outputobjectrequired
namestringrequired
The name of the check.
check_suiteobjectrequired
appobjectrequired
GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub.
pull_requestsarray<PullRequestMinimal>required
Pull 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.
deploymentobjectoptional
A deployment created as the result of an Actions check run from a workflow that references an environment