PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}

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.

Servers

Path parameters

Name Type Required Description
repo String Yes

The name of the repository without the .git extension. The name is not case sensitive.

owner String Yes

The account owner of the repository. The name is not case sensitive.

check_run_id Integer Yes

The unique identifier of the check run.

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Request body fields

Name Type Required Description
external_id String No

A reference for the run on the integrator's system.

actions[] Array No

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."

actions[].description String Yes

A short explanation of what this action would do. The maximum size is 40 characters.

actions[].label String Yes

The text to be displayed on a button in the web UI. The maximum size is 20 characters.

actions[].identifier String Yes

A reference for the action on the integrator's system. The maximum size is 20 characters.

name String No

The name of the check. For example, "code-coverage".

output Object No

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.

output.text String No

Can contain Markdown.

output.annotations[] Array No

Adds 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 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".

output.annotations[].raw_details String No

Details about this annotation. The maximum size is 64 KB.

output.annotations[].message String Yes

A short description of the feedback for these lines of code. The maximum size is 64 KB.

output.annotations[].title String No

The title that represents the annotation. The maximum size is 255 characters.

output.annotations[].start_column Integer No

The 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.

output.annotations[].end_column Integer No

The 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.

output.annotations[].end_line Integer Yes

The end line of the annotation.

output.annotations[].path String Yes

The path of the file to add an annotation to. For example, assets/css/main.css.

output.annotations[].start_line Integer Yes

The start line of the annotation. Line numbers start at 1.

output.annotations[].annotation_level String Yes

The level of the annotation.

Possible values:

  • "failure"
  • "notice"
  • "warning"
output.images[] Array No

Adds images to the output displayed in the GitHub pull request UI.

output.images[].caption String No

A short image description.

output.images[].image_url String Yes

The full URL of the image.

output.images[].alt String Yes

The alternative text for the image.

output.title String No

Required.

output.summary String Yes

Can contain Markdown.

details_url String No

The URL of the integrator's site that has the full details of the check.

status String No

The current status of the check run. Only GitHub Actions can set a status of waiting, pending, or requested.

Possible values:

  • "requested"
  • "in_progress"
  • "completed"
  • "queued"
  • "waiting"
  • "pending"
completed_at String No

The time the check completed. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.

conclusion String No

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.

Possible values:

  • "action_required"
  • "skipped"
  • "neutral"
  • "success"
  • "failure"
  • "stale"
  • "cancelled"
  • "timed_out"
started_at String No

This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.