CreateCheckRun

Updated at:

Creates a check run record.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

POST /api/v4/projects/check_runs/create_check_run HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

organizationId

string

Yes

The organization ID. You can obtain the string-formatted organization ID from the Yunxiao URL, such as https://devops.aliyun.com/organization/[OrganizationId].

5ebbc0228123212b59xxxxx

accessToken

string

No

The personal access token. This parameter is not required if you use an Alibaba Cloud AccessKey pair or Security Token Service (STS) for temporary authorization.

f0b1e61db5961df5975a93f9129d2513

repositoryIdentity

string

Yes

The ID or full path of the code repository.

2835387 or codeup/codeup-demo

body

object

No

The request body.

name

string

Yes

The name of the check run.

Note

The name must be unique within a specific context, such as a specified code repository, commit ID, and author. The name can be up to 50 characters in length.

my-check-ci

headSha

string

Yes

The commit ID.

Note

The commit SHA. Make sure that the commit is the source of a merge request.

40f4ccfe019cdd4a62d4acb0c57130106fc7e1be

status

string

No

The status.

Valid values:

  • queued: The check run is queued.

  • in_progress: The check run is in progress.

  • completed: The check run is completed.

completed

conclusion

string

No

The conclusion.

Valid values:

  • cancelled: The check run is canceled.

  • failure: The check run failed.

  • neutral: The check run is in a neutral state, which is considered a success.

  • success: The check run succeeded.

  • skipped: The check run is skipped, which is considered a success.

  • timed_out: The check run timed out.

success

startedAt

string

No

The start time of the check run.

Note

Specify the time in the ISO 8601 standard in the YYYY-MM-DDTHH:MM:SSZ format. Example: 2023-03-15T08:00:00Z.

2023-03-15T08:00:00Z

completedAt

string

No

The completion time of the check run.

Note

Specify the time in the ISO 8601 standard in the YYYY-MM-DDTHH:MM:SSZ format. Example: 2023-03-15T08:00:00Z.

2023-03-15T08:00:00Z

externalId

string

No

The ID of the external system.

Note

The external system refers to your detection system. You can determine the ID to be written to this field. The platform stores the ID as a string.

42

detailsUrl

string

No

The URL of the third-party interactive system details page. You can specify the URL, and the platform only provides the redirection capability.

https://example.com/checks/1001

output

object

No

The display information.

title

string

Yes

The title of the UI module. This is not the name.

Mighty Readme report

summary

string

Yes

The summary of the check run.

Note

Markdown format is supported. The maximum length is 64 KB, which is 65,535 characters.

Summary content

text

string

No

The details.

Note

Markdown format is supported. The maximum length is 64 KB, which is 65,535 characters.

Detail content

images

array<object>

No

The image information.

Note

Check runs support displaying image information in the output display module.

object

No

The image information.

alt

string

Yes

The alt text.

test-image-alt

imageUrl

string

Yes

The image URL. Make sure that the URL is accessible. Otherwise, the image cannot be displayed on the page.

https://example.com/images/check-result.png

caption

string

No

The brief description of the image.

test

annotations

array<object>

No

The list of check annotations.

Note

For some third-party systems, code quality detection results may be obtained. To display the results, you can call the API to write the information to the check run as annotations.

object

No

The check annotation information.

path

string

Yes

The file path.

demo/test.txt

startLine

integer

Yes

The start line.

Note

The value starts from 1. You must ensure the validity of the line number. Otherwise, the annotation cannot be displayed.

1

endLine

integer

Yes

The end line.

2

startColumn

integer

No

The start column.

Note

This field is valid only when startLine is equal to endLine.

3

endColumn

integer

No

The end column.

Note

This field is valid only when startLine is equal to endLine.

5

annotationLevel

string

Yes

The level of the check annotation.

Valid values:

  • notice: Notice.

  • warning: Warning.

  • failure: Failure.

notice

message

string

Yes

The brief description.

Brief description of the check annotation

title

string

No

The title of the check annotation.

Title of the check annotation

rawDetails

string

No

The details. The maximum size is 64 KB.

Detail content

Response elements

Element

Type

Description

Example

object

Schema of Response

requestId

string

The request ID.

ASSDS-ASSASX-XSAXSA-XSAXSAXS

success

boolean

Indicates whether the call was successful.

true

errorCode

string

The error code.

SYSTEM_UNKNOWN_ERROR

errorMessage

string

The error message.

""

result

object

The returned result.

id

integer

The unique identifier.

524836

createdAt

string

The creation time, in ISO 8601 format with a time zone offset.

2022-01-14T21:08:26+08:00

updatedAt

string

The update time, in ISO 8601 format with a time zone offset.

2022-01-14T21:08:26+08:00

startedAt

string

The start time.

2023-03-15T08:00:00Z

completedAt

string

The completion time.

2023-03-15T08:00:00Z

externalId

string

The external system ID.

42

name

string

The name.

my-check-ci

headSha

string

The commit ID.

40f4ccfe019cdd4a62d4acb0c57130106fc7e1be

status

string

The status.

Valid values:

  • queued: The check run is queued.

  • in_progress: The check run is in progress.

  • completed: The check run is completed.

completed

conclusion

string

The conclusion. Valid values:

  • cancelled: Cancelled.

  • failure: Failed.

  • neutral: Neutral status, which is counted as success.

  • success: Successful.

  • skipped: Skipped, which is counted as success.

  • timed_out: Timed out.

success

detailsUrl

string

The URL of the third-party interactive system details page. You can specify the URL, and the platform only provides the redirection capability.

https://example.com/checks/1001

checkSuite

object

The check suite.

id

integer

The unique identifier of the check suite.

1

writer

object

The brief information about the writer.

id

string

The Alibaba Cloud account ID of the user.

123456789012****

type

string

The writer type. Valid values:

  • User: User.

User

name

string

The name of the writer.

test-codeup

slug

string

The alias.

test-codeup

logoUrl

string

The URL of the writer's profile picture.

https://example.com/images/avatar.png

output

object

The page display information.

title

string

The title of the UI module. This is not the name.

Mighty Readme report

summary

string

The summary of the check run.

Note

Markdown format is supported. The maximum length is 64 KB, which is 65,535 characters.

Summary content

text

string

The details.

Note

Markdown format is supported. The maximum length is 64 KB, which is 65,535 characters.

Detail content

images

array<object>

The list of image information.

Note

Check runs support displaying image information in the output display module.

object

The image information.

alt

string

The alt text.

test-image-alt

imageUrl

string

The image URL. Make sure that the URL is accessible. Otherwise, the image cannot be displayed on the page.

https://example.com/images/check-result.png

caption

string

The brief description of the image.

test

annotations

array<object>

The list of check annotations.

Note

For some third-party systems, code quality detection results may be obtained. To display the results, you can call the API to write the information to the check run as annotations.

object

The check annotation information.

id

integer

The unique identifier of the check annotation.

2

path

string

The file path.

demo/test.txt

startLine

integer

The start line.

Note

The value starts from 1. You must ensure the validity of the line number. Otherwise, the annotation cannot be displayed.

1

endLine

integer

The end line.

2

startColumn

integer

The start column.

Note

This field is valid only when startLine is equal to endLine.

3

endColumn

integer

The end column.

Note

This field is valid only when startLine is equal to endLine.

5

annotationLevel

string

The level of the check annotation.

Valid values:

  • notice: Notice.

  • warning: Warning.

  • failure: Failure.

notice

message

string

The brief description.

Brief description of the check annotation

title

string

The title of the check annotation.

Title of the check annotation

rawDetails

string

The details. The maximum size is 64 KB.

Detailed information

Examples

Success response

JSON format

{
  "requestId": "ASSDS-ASSASX-XSAXSA-XSAXSAXS",
  "success": true,
  "errorCode": "SYSTEM_UNKNOWN_ERROR",
  "errorMessage": "\"\"",
  "result": {
    "id": 524836,
    "createdAt": "2022-01-14T21:08:26+08:00",
    "updatedAt": "2022-01-14T21:08:26+08:00",
    "startedAt": "2023-03-15T08:00:00Z",
    "completedAt": "2023-03-15T08:00:00Z",
    "externalId": "42",
    "name": "my-check-ci\n",
    "headSha": "40f4ccfe019cdd4a62d4acb0c57130106fc7e1be",
    "status": "completed",
    "conclusion": "success",
    "detailsUrl": "xxx",
    "checkSuite": {
      "id": 1
    },
    "writer": {
      "id": "xxx",
      "type": "User",
      "name": "test-codeup",
      "slug": "test-codeup",
      "logoUrl": "xxx"
    },
    "output": {
      "title": "Mighty Readme report\n",
      "summary": "Summary content",
      "text": "Detail content",
      "images": [
        {
          "alt": "test-image-alt",
          "imageUrl": "xxx",
          "caption": "test"
        }
      ]
    },
    "annotations": [
      {
        "id": 2,
        "path": "demo/test.txt",
        "startLine": 1,
        "endLine": 2,
        "startColumn": 3,
        "endColumn": 5,
        "annotationLevel": "notice",
        "message": "Brief description of the write-back check annotation",
        "title": "Title of the check annotation",
        "rawDetails": "Details"
      }
    ]
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.