ListCheckRuns - 查询运行检查列表

更新时间:
复制为 MD 格式

通过 OpenAPI 分页查询指定某个 ref 的所有 check run。

适用版本

中心版、Region

服务接入点与授权信息

产品

资源

所需权限

代码管理

运行检查

只读

请求语法

中心版

GET https://{domain}/oapi/v1/codeup/organizations/{organizationId}/repositories/{repositoryId}/checkRuns

Region

GET https://{domain}/oapi/v1/codeup/repositories/{repositoryId}/checkRuns

请求头

参数

类型

是否必填

描述

示例值

x-yunxiao-token

string

个人访问令牌。

pt-0fh3****0fbG_35af****0484

请求参数

参数

类型

位置

是否必填

描述

示例值

organizationId

string

path

  • 是:中心版

  • 否:Region

组织 ID。

60d54f3daccf2bbd6659f3ad

repositoryId

string

path

代码库 ID 或者 URL-Encoder 编码的全路径。

2813489或者60de7a6852743a5162b5f957%2FDemoRepo

ref

string

query

提交 ID、分支名称或者标签名称。

6da8c14b5a9102998148b7ea35f96507d5304f74

page

integer

query

页码,默认从1开始,一般不要超过150页。

1

perPage

integer

query

每页大小,默认20,取值范围【1,100】。

20

请求示例

中心版

curl -X 'GET' \
  'https://{domain}/oapi/v1/codeup/organizations/60d54f3daccf2bbd6659f3ad/repositories/2813489或者60de7a6852743a5162b5f957%2FDemoRepo/checkRuns?ref=6da8c14b5a9102998148b7ea35f96507d5304f74&page=1&perPage=20' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

Region

curl -X 'GET' \
  'https://{domain}/oapi/v1/codeup/repositories/2813489或者60de7a6852743a5162b5f957%2FDemoRepo/checkRuns?ref=6da8c14b5a9102998148b7ea35f96507d5304f74&page=1&perPage=20' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

返回参数

参数

类型

描述

示例值

-

array

-

object

annotations

array

注解信息。

-

object

annotationLevel

string

检查注解的等级:notice - 轻微;warning - 警告;failure - 严重。

notice

createdAt

string

创建时间。

2024-10-05T15:30:45Z

endColumn

integer

结束列,当且仅当 startLine=endLine 时,该字段值有效。

2

endLine

integer

结束行。

2

id

integer

检查注解 ID,唯一标识。

1

message

string

摘要信息。

check run annotation message

path

string

文件路径。

src/test/main.java

rawDetails

string

详情信息,限制64KB 以内。

check run annotation raw details text

startColumn

integer

起始列,当且仅当 startLine=endLine 时,该字段值有效。

1

startLine

integer

起始行,需要用户自行确认文件行数的有效性,否则无法展示,其余类似。

1

title

string

检查注解的标题。

check run annotation title

updatedAt

string

更新时间。

2024-10-05T15:30:45Z

checkSuite

object

检查套件信息。

id

integer

唯一标识。

1

completedAt

string

三方检查的完成时间。

2024-10-05T15:30:45Z

conclusion

string

结论:cancelled - 已取消;failure - 失败;neutral - 中立状态,算作成功状态;success - 成功;skipped - 跳过,算作成功状态;timed_out - 超时。

success

createdAt

string

回写记录的创建时间。

2024-10-05T15:30:45Z

detailsUrl

string

三方交互系统的链接地址,由用户自行决定,平台仅提供跳转能力。

http://example.test

externalId

string

外部系统 ID。

1

headSha

string

提交 ID。

6da8c14b5a9102998148b7ea35f96507d5304f74

id

integer

唯一标识。

1

name

string

check run 的名称。

Test Check Run

output

object

页面展示信息。

images

array

可展示的图片,不超过3张。

-

object

alt

string

alt 文本信息。

Test

caption

string

图片信息的简要描述。

alt caption

imageUrl

string

图片地址,须确保能够有效访问,否则页面无法加载。

https://example/example/w/100/h/100

summary

string

摘要信息,支持 MarkDown 格式,最大字符长度为64KB,即65535个字符。

check run summary

text

string

详情信息,支持 MarkDown 格式,最大字符长度为64KB,即65535个字符。

check run markdown content text

title

string

标题。

check run title

startedAt

string

三方检查的开始时间。

2024-10-05T15:30:45Z

status

string

状态:queued - 队列中;in_progress - 运行中;completed - 完成。

completed

updatedAt

string

回写记录的更新时间。

2024-10-05T15:30:45Z

writer

object

写入人信息。

id

string

用户 ID。

62c795xxxb468af8

logoUrl

string

用户头像地址。

https://example/example/w/100/h/100

name

string

用户名称。

codeup-name

slug

string

用户登录名。

codeup-username

type

string

写入人类型:User - 用户;Bot - 应用(暂无)。

User

返回示例

[
    {
        "annotations": [
            {
                "annotationLevel": "notice",
                "createdAt": "2024-10-05T15:30:45Z",
                "endColumn": 2,
                "endLine": 2,
                "id": 1,
                "message": "check run annotation message",
                "path": "src/test/main.java",
                "rawDetails": "check run annotation raw details text",
                "startColumn": 1,
                "startLine": 1,
                "title": "check run annotation title",
                "updatedAt": "2024-10-05T15:30:45Z"
            }
        ],
        "checkSuite": {
            "id": 1
        },
        "completedAt": "2024-10-05T15:30:45Z",
        "conclusion": "success",
        "createdAt": "2024-10-05T15:30:45Z",
        "detailsUrl": "http://example.test",
        "externalId": "1",
        "headSha": "6da8c14b5a9102998148b7ea35f96507d5304f74",
        "id": 1,
        "name": "Test Check Run",
        "output": {
            "images": [
                {
                    "alt": "Test",
                    "caption": "alt caption",
                    "imageUrl": "https://example/example/w/100/h/100"
                }
            ],
            "summary": "check run summary",
            "text": "check run markdown content text",
            "title": "check run title"
        },
        "startedAt": "2024-10-05T15:30:45Z",
        "status": "completed",
        "updatedAt": "2024-10-05T15:30:45Z",
        "writer": {
            "id": "62c795xxxb468af8",
            "logoUrl": "https://example/example/w/100/h/100",
            "name": "codeup-name",
            "slug": "codeup-username",
            "type": "User"
        }
    }
]

响应头

参数

描述

示例值

x-next-page

下一页。

3

x-page

当前页。

2

x-per-page

每页大小。

20

x-prev-page

前一页。

1

x-request-id

请求 ID。

37294673-00CA-5B8B-914F-A8B35511E90A

x-total

总数。

50

x-total-pages

总分页数。

3

错误码

访问错误码中心查看 API 相关错误码。