UpdateCheckRun

Updated at:

Updates the information of a check run record. The current identity must match the creator of the check run to perform the update.

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/update_check_run HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

organizationId

string

Yes

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

60de7a6852743a5162b5f957

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

checkRunId

integer

Yes

The ID of the check run.

2

body

object

No

The request body.

name

string

No

The name of the check run.

my-check-ci

startedAt

string

No

The start time of the check run.

Note

ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ, such as 2023-03-15T08:00:00Z.

2023-03-15T08:00:00Z

completedAt

string

No

The completion time of the check run.

Note

Note: ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ, such as 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 write to this field. The platform stores it only as a string.

42

detailsUrl

string

No

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

https://example.com/checks/1001

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

  • 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

output

object

No

The display information on the page.

title

string

No

The title of the UI module, which is different from 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 detailed information.

Note

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

Detailed content

images

array<object>

No

The list of image information.

Note

A check run supports displaying image information in the output display module.

object

No

The image information.

alt

string

Yes

The alt text of the image.

test-image-alt

imageUrl

string

Yes

The URL of the image. Ensure 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 write the information to the check run through annotations by calling the API.

  • In an update operation, annotation information is only appended. Avoid writing duplicate annotations.

object

No

The check annotation.

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: The issue is minor.

  • warning: The issue is a warning.

  • failure: The issue is critical.

failure

message

string

Yes

The brief description.

Brief description of the written-back check annotation

title

string

No

The title of the check annotation.

Title of the check annotation

rawDetails

string

No

The detailed information. The size is limited to 64 KB.

Detailed 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 is successful.

true

errorCode

string

The error code.

SYSTEM_UNKNOWN_ERROR

errorMessage

string

The error message.

""

result

object

The result.

id

integer

The unique identifier.

524836

createdAt

string

The creation time in ISO 8601 format, including the time zone offset.

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

updatedAt

string

The update time in ISO 8601 format, including the 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 ID of the external system.

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: The check run is cancelled.

  • failure: The check run failed.

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

  • success: The check run is successful.

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

  • timed_out: The check run timed out.

success

detailsUrl

string

The URL for the details page of the third-party interactive system. 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 type of the writer. Valid values:

  • User: The writer is a 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 display information on the page.

title

string

The title of the UI module, which is different from 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 detailed information.

Note

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

Detailed content

images

array<object>

The image information.

Note

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

object

The image information.

alt

string

The alt text of the image.

test-image-alt

imageUrl

string

The URL of the image. Ensure 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 check results may be obtained. To display these results, you can write the information to the check run as annotations through the API.

object

The check annotation.

id

integer

The unique identifier of the check annotation.

1

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: The issue is minor.

  • warning: The issue is a warning.

  • failure: The issue is critical.

warning

message

string

The brief description.

Brief description of the written-back check annotation

title

string

The title of the check annotation.

Title of the check annotation

rawDetails

string

The detailed information. The size is limited to 64 KB.

Details

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\n",
    "updatedAt": "2022-01-14T21:08:26+08:00\n",
    "startedAt": "2023-03-15T08:00:00Z\n",
    "completedAt": "2023-03-15T08:00:00Z\n",
    "externalId": "42",
    "name": "my-check-ci\n",
    "headSha": "40f4ccfe019cdd4a62d4acb0c57130106fc7e1be\n",
    "status": "completed",
    "conclusion": "success",
    "detailsUrl": "xxx",
    "checkSuite": {
      "id": 1
    },
    "writer": {
      "id": "xxx\n",
      "type": "User",
      "name": "test-codeup\n",
      "slug": "test-codeup\n",
      "logoUrl": "xxx\n"
    },
    "output": {
      "title": "Mighty Readme report\n",
      "summary": "Summary information content",
      "text": "Detailed information content",
      "images": [
        {
          "alt": "test-image-alt\n",
          "imageUrl": "xxx",
          "caption": "test\n"
        }
      ]
    },
    "annotations": [
      {
        "id": 1,
        "path": "demo/test.txt\n",
        "startLine": 1,
        "endLine": 2,
        "startColumn": 3,
        "endColumn": 5,
        "annotationLevel": "warning",
        "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.