---
title: "Update a check run"
method: PATCH
path: "/repos/{owner}/{repo}/check-runs/{check_run_id}"
tags: ["checks"]
---

# Update a check run

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

**Note:** The Checks API only looks 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.

Updates a check run for a specific commit in a repository. Your GitHub App must have the `checks:write` permission to edit check runs.

## Path parameters

- `owner` string, required
- `repo` string, required
- `check_run_id` integer, required

## Request body

- union
  - object
    - `name` string — The name of the check. For example, "code-coverage".
    - `details_url` string — The URL of the integrator's site that has the full details of the check.
    - `external_id` string — A reference for the run on the integrator's system.
    - `started_at` string, date-time — This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.
    - `status` 'completed' — The current status.
    - `conclusion` 'action_required' | 'cancelled' | 'failure' | 'neutral' | 'success' | 'skipped' | 'stale' | 'timed_out', required — **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.
    - `completed_at` string, date-time — 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`.
    - `output` object — 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.
      - `title` string — **Required**.
      - `summary` string, required — Can contain Markdown.
      - `text` string — Can contain Markdown.
      - `annotations` object[] — 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](https://docs.github.com/enterprise-server@3.5/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/enterprise-server@3.5/articles/about-status-checks#checks)".
        - `path` string, required — The path of the file to add an annotation to. For example, `assets/css/main.css`.
        - `start_line` integer, required — The start line of the annotation. Line numbers start at 1.
        - `end_line` integer, required — The end line of the annotation.
        - `start_column` integer — 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.
        - `end_column` integer — 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.
        - `annotation_level` 'notice' | 'warning' | 'failure', required — The level of the annotation.
        - `message` string, required — A short description of the feedback for these lines of code. The maximum size is 64 KB.
        - `title` string — The title that represents the annotation. The maximum size is 255 characters.
        - `raw_details` string — Details about this annotation. The maximum size is 64 KB.
      - `images` object[] — Adds images to the output displayed in the GitHub pull request UI.
        - `alt` string, required — The alternative text for the image.
        - `image_url` string, required — The full URL of the image.
        - `caption` string — A short image description.
    - `actions` object[] — 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. See the [`actions` object](https://docs.github.com/enterprise-server@3.5/rest/reference/checks#actions-object) description. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://docs.github.com/enterprise-server@3.5/rest/reference/checks#check-runs-and-requested-actions)."
      - `label` string, required — The text to be displayed on a button in the web UI. The maximum size is 20 characters.
      - `description` string, required — A short explanation of what this action would do. The maximum size is 40 characters.
      - `identifier` string, required — A reference for the action on the integrator's system. The maximum size is 20 characters.
  - object
    - `name` string — The name of the check. For example, "code-coverage".
    - `details_url` string — The URL of the integrator's site that has the full details of the check.
    - `external_id` string — A reference for the run on the integrator's system.
    - `started_at` string, date-time — This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.
    - `status` 'queued' | 'in_progress' — The current status.
    - `conclusion` 'action_required' | 'cancelled' | 'failure' | 'neutral' | 'success' | 'skipped' | 'stale' | 'timed_out' — **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.
    - `completed_at` string, date-time — 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`.
    - `output` object — 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.
      - `title` string — **Required**.
      - `summary` string, required — Can contain Markdown.
      - `text` string — Can contain Markdown.
      - `annotations` object[] — 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](https://docs.github.com/enterprise-server@3.5/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/enterprise-server@3.5/articles/about-status-checks#checks)".
        - `path` string, required — The path of the file to add an annotation to. For example, `assets/css/main.css`.
        - `start_line` integer, required — The start line of the annotation. Line numbers start at 1.
        - `end_line` integer, required — The end line of the annotation.
        - `start_column` integer — 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.
        - `end_column` integer — 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.
        - `annotation_level` 'notice' | 'warning' | 'failure', required — The level of the annotation.
        - `message` string, required — A short description of the feedback for these lines of code. The maximum size is 64 KB.
        - `title` string — The title that represents the annotation. The maximum size is 255 characters.
        - `raw_details` string — Details about this annotation. The maximum size is 64 KB.
      - `images` object[] — Adds images to the output displayed in the GitHub pull request UI.
        - `alt` string, required — The alternative text for the image.
        - `image_url` string, required — The full URL of the image.
        - `caption` string — A short image description.
    - `actions` object[] — 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. See the [`actions` object](https://docs.github.com/enterprise-server@3.5/rest/reference/checks#actions-object) description. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://docs.github.com/enterprise-server@3.5/rest/reference/checks#check-runs-and-requested-actions)."
      - `label` string, required — The text to be displayed on a button in the web UI. The maximum size is 20 characters.
      - `description` string, required — A short explanation of what this action would do. The maximum size is 40 characters.
      - `identifier` string, required — A reference for the action on the integrator's system. The maximum size is 20 characters.

## Response `200`

Response

- CheckRun — A check performed on the code of a given code change
  - `id` integer, required — The id of the check.
  - `head_sha` string, required — The SHA of the commit that is being checked.
  - `node_id` string, required
  - `external_id` string, nullable, required
  - `url` string, required
  - `html_url` string, nullable, required
  - `details_url` string, nullable, required
  - `status` 'queued' | 'in_progress' | 'completed', required — The phase of the lifecycle that the check is currently in.
  - `conclusion` 'success' | 'failure' | 'neutral' | 'cancelled' | 'skipped' | 'timed_out' | 'action_required', nullable, required
  - `started_at` string, date-time, nullable, required
  - `completed_at` string, date-time, nullable, required
  - `output` object, required
    - `title` string, nullable, required
    - `summary` string, nullable, required
    - `text` string, nullable, required
    - `annotations_count` integer, required
    - `annotations_url` string, uri, required
  - `name` string, required — The name of the check.
  - `check_suite` object, nullable, required
    - `id` integer, required
  - `app` NullableIntegration, nullable, required — 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.
    - `id` integer, required — Unique identifier of the GitHub app
    - `slug` string — The slug name of the GitHub app
    - `node_id` string, required
    - `owner` NullableSimpleUser, nullable, required — A GitHub user.
      - `name` string, nullable
      - `email` string, nullable
      - `login` string, required
      - `id` integer, required
      - `node_id` string, required
      - `avatar_url` string, uri, required
      - `gravatar_id` string, nullable, required
      - `url` string, uri, required
      - `html_url` string, uri, required
      - `followers_url` string, uri, required
      - `following_url` string, required
      - `gists_url` string, required
      - `starred_url` string, required
      - `subscriptions_url` string, uri, required
      - `organizations_url` string, uri, required
      - `repos_url` string, uri, required
      - `events_url` string, required
      - `received_events_url` string, uri, required
      - `type` string, required
      - `site_admin` boolean, required
      - `starred_at` string
    - `name` string, required — The name of the GitHub app
    - `description` string, nullable, required
    - `external_url` string, uri, required
    - `html_url` string, uri, required
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required
    - `permissions` object, required — The set of permissions for the GitHub app
      - `issues` string
      - `checks` string
      - `metadata` string
      - `contents` string
      - `deployments` string
    - `events` string[], required — The list of events for the GitHub app
    - `installations_count` integer — The number of installations associated with the GitHub app
    - `client_id` string
    - `client_secret` string
    - `webhook_secret` string, nullable
    - `pem` string
  - `pull_requests` 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.
    - `id` integer, required
    - `number` integer, required
    - `url` string, required
    - `head` object, required
      - `ref` string, required
      - `sha` string, required
      - `repo` object, required
        - `id` integer, required
        - `url` string, required
        - `name` string, required
    - `base` object, required
      - `ref` string, required
      - `sha` string, required
      - `repo` object, required
        - `id` integer, required
        - `url` string, required
        - `name` string, required
  - `deployment` DeploymentSimple — A deployment created as the result of an Actions check run from a workflow that references an environment
    - `url` string, uri, required
    - `id` integer, required — Unique identifier of the deployment
    - `node_id` string, required
    - `task` string, required — Parameter to specify a task to execute
    - `original_environment` string
    - `environment` string, required — Name for the target deployment environment.
    - `description` string, nullable, required
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required
    - `statuses_url` string, uri, required
    - `repository_url` string, uri, required
    - `transient_environment` boolean — Specifies if the given environment is will no longer exist at some point in the future. Default: false.
    - `production_environment` boolean — Specifies if the given environment is one that end-users directly interact with. Default: false.
    - `performed_via_github_app` NullableIntegration, nullable — 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.
      - `id` integer, required — Unique identifier of the GitHub app
      - `slug` string — The slug name of the GitHub app
      - `node_id` string, required
      - `owner` NullableSimpleUser, nullable, required — A GitHub user.
        - `name` string, nullable
        - `email` string, nullable
        - `login` string, required
        - `id` integer, required
        - `node_id` string, required
        - `avatar_url` string, uri, required
        - `gravatar_id` string, nullable, required
        - `url` string, uri, required
        - `html_url` string, uri, required
        - `followers_url` string, uri, required
        - `following_url` string, required
        - `gists_url` string, required
        - `starred_url` string, required
        - `subscriptions_url` string, uri, required
        - `organizations_url` string, uri, required
        - `repos_url` string, uri, required
        - `events_url` string, required
        - `received_events_url` string, uri, required
        - `type` string, required
        - `site_admin` boolean, required
        - `starred_at` string
      - `name` string, required — The name of the GitHub app
      - `description` string, nullable, required
      - `external_url` string, uri, required
      - `html_url` string, uri, required
      - `created_at` string, date-time, required
      - `updated_at` string, date-time, required
      - `permissions` object, required — The set of permissions for the GitHub app
        - `issues` string
        - `checks` string
        - `metadata` string
        - `contents` string
        - `deployments` string
      - `events` string[], required — The list of events for the GitHub app
      - `installations_count` integer — The number of installations associated with the GitHub app
      - `client_id` string
      - `client_secret` string
      - `webhook_secret` string, nullable
      - `pem` string

---

[API](https://skmtc.net/github/apis/github-v3-rest-api-4.md) · [All operations](https://skmtc.net/github/apis/github-v3-rest-api-4/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/github-v3-rest-api-4/versions/ee6c7a46328e/schema)
