POST /repos/{owner}/{repo}/check-runs
Creates a new check run for a specific commit in a repository.
To create a check run, you must use a GitHub App. OAuth apps and authenticated users are not able to create a check suite.
In a check suite, GitHub limits the number of check runs with the same name to 1000. Once these check runs exceed 1000, GitHub will start to automatically delete older check runs.
[!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.
Servers
- https://api.github.com
Path parameters
Name | Type | Required | Description |
---|---|---|---|
repo |
String | Yes |
The name of the repository without the |
owner |
String | Yes |
The account owner of the repository. The name is not case sensitive. |
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 |
---|---|---|---|
head_sha |
String | Yes |
The SHA of the commit. |
external_id |
String | No |
A reference for the run on the integrator's system. |
actions[] |
Array | No |
Displays a button on GitHub that can be clicked to alert your app to do additional tasks. For example, a code linting app can display a button that automatically fixes detected errors. The button created in this object is displayed after the check run completes. When a user clicks the button, GitHub sends the |
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 | Yes |
The name of the check. For example, "code-coverage". |
output |
Object | No |
Check runs can accept a variety of data in the |
output.text |
String | No |
The details of the check run. This parameter supports Markdown. Maximum length: 65535 characters. |
output.annotations[] |
Array | No |
Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the Checks and Files changed tab of the pull request. 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 how you can view annotations on GitHub, 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 |
output.annotations[].end_column |
Integer | No |
The end column of the annotation. Annotations only support |
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, |
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:
|
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 | Yes |
The title of the check run. |
output.summary |
String | Yes |
The summary of the check run. This parameter supports Markdown. Maximum length: 65535 characters. |
details_url |
String | No |
The URL of the integrator's site that has the full details of the check. If the integrator does not provide this, then the homepage of the GitHub app is used. |
status |
String | No |
The current status of the check run. Only GitHub Actions can set a status of Possible values:
Default value: "queued" |
completed_at |
String | No |
The time the check completed. This is a timestamp in ISO 8601 format: |
conclusion |
String | No |
Required if you provide Possible values:
|
started_at |
String | No |
The time that the check run began. This is a timestamp in ISO 8601 format: |
How to start integrating
- Add HTTP Task to your workflow definition.
- 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.
- Click Test request to test run your request to the API and see the API's response.