### GET /{repo} Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-basic-info:r ```markdown ### Parameters - **repo** (string, path, required): repo path ### Responses #### 200 - repo Empty response body ### Example Usage ```bash curl -X GET "https://api.example.com/{repo}" ``` ``` -------------------------------- ### GET /{repo}/-/settings/cloud-native-build Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-manage:r ```markdown ### Parameters - **repo** (string, path, required): repo ### Responses #### 200 - OK Empty response body #### 404 - Not Found Not Found #### 500 - Internal Server Error Internal Server Error ### Example Usage ```bash curl -X GET "https://api.example.com/{repo}/-/settings/cloud-native-build" ``` ``` -------------------------------- ### GET /{repo}/-/badge/list Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-commit-status:r ```markdown ### Parameters - **repo** (string, path, required): 仓库完整路径 - **request** (dto.ListBadgeReq, body, required): ListBadge params ### Responses #### 200 - OK Empty response body ### Example Usage ```bash curl -X GET "https://api.example.com/{repo}/-/badge/list" ``` ``` -------------------------------- ### GET /{repo}/-/releases/latest/download/{fileName} Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-contents:r ```markdown ### Parameters - **repo** (string, path, required): Repo - **fileName** (string, path, required): File name, eg: test.png ### Responses #### 302 - Found Found ### Example Usage ```bash curl -X GET "https://api.example.com/{repo}/-/releases/latest/download/{fileName}" ``` ``` -------------------------------- ### GET /{repo}/-/settings/push-limit Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-manage:r ```markdown ### Parameters - **repo** (string, path, required): repo ### Responses #### 200 - OK Empty response body #### 404 - Not Found Not Found #### 500 - Internal Server Error Internal Server Error ### Example Usage ```bash curl -X GET "https://api.example.com/{repo}/-/settings/push-limit" ``` ``` -------------------------------- ### GET /{repo}/-/settings/branch-protections Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-manage:r ```markdown ### Parameters - **repo** (string, path, required): repo ### Responses #### 200 - OK Empty response body #### 404 - Not Found Not Found #### 500 - Internal Server Error Internal Server Error ### Example Usage ```bash curl -X GET "https://api.example.com/{repo}/-/settings/branch-protections" ``` ``` -------------------------------- ### GET /{repo}/-/git/compare/{base_head} Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-code:r ```markdown ### Parameters - **repo** (string, path, required): repo - **base_head** (string, path, required): base...head ### Responses #### 200 - OK Empty response body #### 404 - Not Found Not Found #### 500 - Internal Server Error Internal Server Error ### Example Usage ```bash curl -X GET "https://api.example.com/{repo}/-/git/compare/{base_head}" ``` ``` -------------------------------- ### GET /{repo}/-/git/head Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-code:r ```markdown ### Parameters - **repo** (string, path, required): repo ### Responses #### 200 - OK Empty response body #### 404 - Not Found Not Found #### 500 - Internal Server Error Internal Server Error ### Example Usage ```bash curl -X GET "https://api.example.com/{repo}/-/git/head" ``` ``` -------------------------------- ### GET /{repo}/-/releases/tags/{tag} Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-code:r ```markdown ### Parameters - **repo** (string, path, required): repo - **tag** (string, path, required): tag name ### Responses #### 200 - OK Empty response body #### 404 - Not Found Not Found #### 500 - Internal Server Error Internal Server Error ### Example Usage ```bash curl -X GET "https://api.example.com/{repo}/-/releases/tags/{tag}" ``` ``` -------------------------------- ### GET /{repo}/-/releases/latest Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-code:r ```markdown ### Parameters - **repo** (string, path, required): repo ### Responses #### 200 - OK Empty response body #### 404 - Not Found Not Found #### 500 - Internal Server Error Internal Server Error ### Example Usage ```bash curl -X GET "https://api.example.com/{repo}/-/releases/latest" ``` ``` -------------------------------- ### GET /{repo}/-/workspace/detail/{sn} Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-cnb-detail:r ```markdown ### Parameters - **repo** (string, path, required): Repo path - **sn** (string, path, required): SN ### Responses #### 200 - OK Empty response body ### Example Usage ```bash curl -X GET "https://api.example.com/{repo}/-/workspace/detail/{sn}" ``` ``` -------------------------------- ### GET /{repo}/-/git/tags/{tag} Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-contents:r ```markdown ### Parameters - **repo** (string, path, required): repo - **tag** (string, path, required): tag name ### Responses #### 200 - OK Empty response body #### 404 - Not Found Not Found #### 500 - Internal Server Error Internal Server Error ### Example Usage ```bash curl -X GET "https://api.example.com/{repo}/-/git/tags/{tag}" ``` ``` -------------------------------- ### GET /{repo}/-/git/tag-annotations/{tag} Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-contents:r ```markdown ### Parameters - **repo** (string, path, required): repo - **tag** (string, path, required): tag ### Responses #### 200 - OK Empty response body #### 404 - Not Found Not Found #### 500 - Internal Server Error Internal Server Error ### Example Usage ```bash curl -X GET "https://api.example.com/{repo}/-/git/tag-annotations/{tag}" ``` ``` -------------------------------- ### GET /{repo}/-/knowledge/base Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-code:r ```markdown ### Parameters - **repo** (string, path, required): repo ### Responses #### 200 - OK Empty response body #### 404 - Not Found Not Found #### 500 - Internal Server Error Internal Server Error ### Example Usage ```bash curl -X GET "https://api.example.com/{repo}/-/knowledge/base" ``` ``` -------------------------------- ### GET /{repo}/-/settings/branch-protections/{id} Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-manage:r ```markdown ### Parameters - **repo** (string, path, required): repo - **id** (string, path, required): branch protection id ### Responses #### 200 - OK Empty response body #### 404 - Not Found Not Found #### 500 - Internal Server Error Internal Server Error ### Example Usage ```bash curl -X GET "https://api.example.com/{repo}/-/settings/branch-protections/{id}" ``` ``` -------------------------------- ### GET /{repo}/-/releases/{release_id} Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-code:r ```markdown ### Parameters - **repo** (string, path, required): repo - **release_id** (string, path, required): release id ### Responses #### 200 - OK Empty response body #### 404 - Not Found Not Found #### 500 - Internal Server Error Internal Server Error ### Example Usage ```bash curl -X GET "https://api.example.com/{repo}/-/releases/{release_id}" ``` ``` -------------------------------- ### GET /events/{repo}/-/{date} Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. ```markdown ### Parameters - **repo** (string, path, required): repo path - **date** (string, path, required): 动态日期,格式为yy-mm-dd-h, eg:2025-09-11-5 ### Responses #### 200 - OK Empty response body ### Example Usage ```bash curl -X GET "https://api.example.com/events/{repo}/-/{date}" ``` ``` -------------------------------- ### GET /{repo}/-/settings/pull-request Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-manage:r ```markdown ### Parameters - **repo** (string, path, required): repo ### Responses #### 200 - OK Empty response body #### 404 - Not Found Not Found #### 500 - Internal Server Error Internal Server Error ### Example Usage ```bash curl -X GET "https://api.example.com/{repo}/-/settings/pull-request" ``` ``` -------------------------------- ### GET /{repo}/-/badge/git/{sha}/{badge} Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-commit-status:r ```markdown ### Parameters - **repo** (string, path, required): 仓库完整路径 - **sha** (string, path, required): latest 或 commit 8 位短 hash(例如 89d48c07) - **badge** (string, path, required): 徽章名,例如 pr 事件徽章名为:ci/status/pull_request, 如需获取 JSON 数据,可加上 .json 后缀,如:ci/status/pull_request.json - **request** (dto.GetBadgeReq, body, required): GetBadge params ### Responses #### 200 - OK Empty response body ### Example Usage ```bash curl -X GET "https://api.example.com/{repo}/-/badge/git/{sha}/{badge}" ``` ``` -------------------------------- ### GET /{repo}/-/build/runner/download/log/{pipelineId} Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-cnb-trigger:r ```markdown ### Parameters - **repo** (string, path, required): Repo path - **pipelineId** (string, path, required): PipelineId ### Responses #### 404 - Not Found Not Found #### 500 - Internal Server Error Internal Server Error ### Example Usage ```bash curl -X GET "https://api.example.com/{repo}/-/build/runner/download/log/{pipelineId}" ``` ``` -------------------------------- ### GET /{repo}/-/issues/{number} Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-notes:r ```markdown ### Parameters - **repo** (string, path, required): repo - **number** (string, path, required): issue number ### Responses #### 200 - OK Empty response body #### 404 - Not Found Not Found #### 500 - Internal Server Error Internal Server Error ### Example Usage ```bash curl -X GET "https://api.example.com/{repo}/-/issues/{number}" ``` ``` -------------------------------- ### GET /{repo}/-/knowledge/embedding/models Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-code:r ```markdown ### Parameters - **repo** (string, path, required): repo ### Responses #### 200 - OK Empty response body #### 400 - Bad Request Bad Request #### 500 - Internal Server Error Internal Server Error ### Example Usage ```bash curl -X GET "https://api.example.com/{repo}/-/knowledge/embedding/models" ``` ``` -------------------------------- ### GET /user Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. account-profile:r ```markdown ### Responses #### 200 - OK Empty response body ### Example Usage ```bash curl -X GET "https://api.example.com/user" ``` ``` -------------------------------- ### GET /{slug}/-/packages/{type}/{name} Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. registry-package:r ```markdown ### Parameters - **slug** (string, path, required): Slug - **type** (string, path, required): Type - **name** (string, path, required): Name ### Responses #### 200 - OK Empty response body ### Example Usage ```bash curl -X GET "https://api.example.com/{slug}/-/packages/{type}/{name}" ``` ``` -------------------------------- ### GET /{repo}/-/git/commits/{ref} Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-code:r ```markdown ### Parameters - **repo** (string, path, required): repo - **ref** (string, path, required): ref ### Responses #### 200 - OK Empty response body #### 404 - Not Found Not Found #### 500 - Internal Server Error Internal Server Error ### Example Usage ```bash curl -X GET "https://api.example.com/{repo}/-/git/commits/{ref}" ``` ``` -------------------------------- ### GET /{mission}/-/mission/view-list Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. mission-manage:r ```markdown ### Parameters - **mission** (string, path, required): mission ### Responses #### 200 - OK Empty response body ### Example Usage ```bash curl -X GET "https://api.example.com/{mission}/-/mission/view-list" ``` ``` -------------------------------- ### GET /{repo}/-/pulls/{number}/files Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-notes:r ```markdown ### Parameters - **repo** (string, path, required): repo - **number** (string, path, required): pull request number ### Responses #### 200 - OK Empty response body #### 404 - Not Found Not Found #### 500 - Internal Server Error Internal Server Error ### Example Usage ```bash curl -X GET "https://api.example.com/{repo}/-/pulls/{number}/files" ``` ``` -------------------------------- ### GET /{repo}/-/git/commit-assets/{sha1} Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-code:r ```markdown ### Parameters - **repo** (string, path, required): repo - **sha1** (string, path, required): sha ### Responses #### 200 - OK Empty response body #### 404 - Not Found Not Found #### 500 - Internal Server Error Internal Server Error ### Example Usage ```bash curl -X GET "https://api.example.com/{repo}/-/git/commit-assets/{sha1}" ``` ``` -------------------------------- ### GET /users/{username}/pinned-repos Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. account-engage:r ```markdown ### Parameters - **username** (string, path, required): User Name ### Responses #### 200 - OK Empty response body ### Example Usage ```bash curl -X GET "https://api.example.com/users/{username}/pinned-repos" ``` ``` -------------------------------- ### GET /{repo}/-/git/commit-annotations/{sha} Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-code:r ```markdown ### Parameters - **repo** (string, path, required): repo - **sha** (string, path, required): commit hash ### Responses #### 200 - OK Empty response body #### 404 - Not Found Not Found #### 500 - Internal Server Error Internal Server Error ### Example Usage ```bash curl -X GET "https://api.example.com/{repo}/-/git/commit-annotations/{sha}" ``` ``` -------------------------------- ### GET /{repo}/-/git/archive-compare-changed-files/{base_head} Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-code:r ```markdown ### Parameters - **repo** (string, path, required): repo - **base_head** (string, path, required): base...head ### Responses #### 404 - Not Found Not Found #### 500 - Internal Server Error Internal Server Error ### Example Usage ```bash curl -X GET "https://api.example.com/{repo}/-/git/archive-compare-changed-files/{base_head}" ``` ``` -------------------------------- ### GET /users/{username} Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. account-profile:r ```markdown ### Parameters - **username** (string, path, required): User Name ### Responses #### 200 - OK Empty response body ### Example Usage ```bash curl -X GET "https://api.example.com/users/{username}" ``` ``` -------------------------------- ### GET /{repo}/-/build/status/{sn} Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-cnb-trigger:r ```markdown ### Parameters - **repo** (string, path, required): Repo path - **sn** (string, path, required): SN ### Responses #### 200 - OK Empty response body ### Example Usage ```bash curl -X GET "https://api.example.com/{repo}/-/build/status/{sn}" ``` ``` -------------------------------- ### GET /{repo}/-/releases/{release_id}/assets/{asset_id} Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-code:r ```markdown ### Parameters - **repo** (string, path, required): repo - **release_id** (string, path, required): release id - **asset_id** (string, path, required): asset id ### Responses #### 200 - OK Empty response body #### 404 - Not Found Not Found #### 500 - Internal Server Error Internal Server Error ### Example Usage ```bash curl -X GET "https://api.example.com/{repo}/-/releases/{release_id}/assets/{asset_id}" ``` ``` -------------------------------- ### GET /{repo}/-/git/branches/{branch} Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-code:r ```markdown ### Parameters - **repo** (string, path, required): repo - **branch** (string, path, required): branch name ### Responses #### 200 - OK Empty response body #### 404 - Not Found Not Found #### 500 - Internal Server Error Internal Server Error ### Example Usage ```bash curl -X GET "https://api.example.com/{repo}/-/git/branches/{branch}" ``` ``` -------------------------------- ### GET /{repo}/-/git/commit-statuses/{commitish} Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-code:r ```markdown ### Parameters - **repo** (string, path, required): repo - **commitish** (string, path, required): commitish ### Responses #### 200 - OK Empty response body #### 404 - Not Found Not Found #### 500 - Internal Server Error Internal Server Error ### Example Usage ```bash curl -X GET "https://api.example.com/{repo}/-/git/commit-statuses/{commitish}" ``` ``` -------------------------------- ### GET /{repo}/-/pulls/{number} Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-pr:r ```markdown ### Parameters - **repo** (string, path, required): repo - **number** (string, path, required): pull request number ### Responses #### 200 - OK Empty response body #### 404 - Not Found Not Found #### 500 - Internal Server Error Internal Server Error ### Example Usage ```bash curl -X GET "https://api.example.com/{repo}/-/pulls/{number}" ``` ``` -------------------------------- ### GET /{repo}/-/issues/{number}/assignees Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-notes:r ```markdown ### Parameters - **repo** (string, path, required): repo - **number** (string, path, required): issue number ### Responses #### 200 - OK Empty response body #### 404 - Not Found Not Found #### 500 - Internal Server Error Internal Server Error ### Example Usage ```bash curl -X GET "https://api.example.com/{repo}/-/issues/{number}/assignees" ``` ``` -------------------------------- ### GET /{repo}/-/issues/{number}/assignees/{assignee} Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-notes:r ```markdown ### Parameters - **repo** (string, path, required): repo - **number** (string, path, required): issue number - **assignee** (string, path, required): assignee ### Responses #### 204 - No Content Empty response body #### 404 - Not Found Not Found #### 500 - Internal Server Error Internal Server Error ### Example Usage ```bash curl -X GET "https://api.example.com/{repo}/-/issues/{number}/assignees/{assignee}" ``` ``` -------------------------------- ### GET /{repo}/-/git/archive-commit-changed-files/{sha1} Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-code:r ```markdown ### Parameters - **repo** (string, path, required): repo - **sha1** (string, path, required): commit sha ### Responses #### 404 - Not Found Not Found #### 500 - Internal Server Error Internal Server Error ### Example Usage ```bash curl -X GET "https://api.example.com/{repo}/-/git/archive-commit-changed-files/{sha1}" ``` ``` -------------------------------- ### GET /{repo}/-/build/logs/stage/{sn}/{pipelineId}/{stageId} Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-cnb-trigger:r ```markdown ### Parameters - **repo** (string, path, required): Repo path - **sn** (string, path, required): SN - **pipelineId** (string, path, required): PipelineId - **stageId** (string, path, required): stageId ### Responses #### 200 - OK Empty response body ### Example Usage ```bash curl -X GET "https://api.example.com/{repo}/-/build/logs/stage/{sn}/{pipelineId}/{stageId}" ``` ``` -------------------------------- ### GET /{repo}/-/pulls/{number}/assignees Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-notes:r ```markdown ### Parameters - **repo** (string, path, required): repo - **number** (string, path, required): pull request number ### Responses #### 200 - OK Empty response body #### 404 - Not Found Not Found #### 500 - Internal Server Error Internal Server Error ### Example Usage ```bash curl -X GET "https://api.example.com/{repo}/-/pulls/{number}/assignees" ``` ``` -------------------------------- ### GET /{repo}/-/pulls/{number}/assignees/{assignee} Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-notes:r ```markdown ### Parameters - **repo** (string, path, required): repo - **number** (string, path, required): number - **assignee** (string, path, required): assignee ### Responses #### 204 - No Content Empty response body #### 404 - Not Found Not Found #### 500 - Internal Server Error Internal Server Error ### Example Usage ```bash curl -X GET "https://api.example.com/{repo}/-/pulls/{number}/assignees/{assignee}" ``` ``` -------------------------------- ### POST /{repo}/-/workspace/start Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-cnb-trigger:rw ```markdown ### Parameters - **repo** (string, path, required): 仓库完整路径 - **request** (dto.StartWorkspaceReq, body, required): StartWorkspace params ### Responses #### 200 - OK Empty response body ### Example Usage ```bash curl -X POST "https://api.example.com/{repo}/-/workspace/start" ``` ``` -------------------------------- ### GET /{repo}/-/pulls/{number}/commit-statuses Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-pr:r ```markdown ### Parameters - **repo** (string, path, required): repo - **number** (string, path, required): pull number ### Responses #### 200 - OK Empty response body #### 404 - Not Found Not Found #### 500 - Internal Server Error Internal Server Error ### Example Usage ```bash curl -X GET "https://api.example.com/{repo}/-/pulls/{number}/commit-statuses" ``` ``` -------------------------------- ### GET /{group} Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. group-resource:r ```markdown ### Parameters - **group** (string, path, required): group path ### Responses #### 200 - group Empty response body ### Example Usage ```bash curl -X GET "https://api.example.com/{group}" ``` ``` -------------------------------- ### GET /{repo}/-/issues/{number}/comments/{comment_id} Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-notes:r ```markdown ### Parameters - **repo** (string, path, required): repo - **number** (string, path, required): number - **comment_id** (string, path, required): comment_id ### Responses #### 200 - OK Empty response body #### 404 - Not Found Not Found #### 500 - Internal Server Error Internal Server Error ### Example Usage ```bash curl -X GET "https://api.example.com/{repo}/-/issues/{number}/comments/{comment_id}" ``` ``` -------------------------------- ### POST /{repo}/-/build/start Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-cnb-trigger:rw ```markdown ### Parameters - **repo** (string, path, required): repo - **request** (dto.StartBuildReq, body, required): Build params ### Responses #### 200 - OK Empty response body ### Example Usage ```bash curl -X POST "https://api.example.com/{repo}/-/build/start" ``` ``` -------------------------------- ### PUT /{repo}/-/settings/cloud-native-build Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-manage:rw ```markdown ### Parameters - **repo** (string, path, required): repo - **pipeline_form** (web.PipelineSettings, body, required): Cloud Native Build Form ### Responses #### 200 - OK Empty response body #### 404 - Not Found Not Found #### 500 - Internal Server Error Internal Server Error ### Example Usage ```bash curl -X PUT "https://api.example.com/{repo}/-/settings/cloud-native-build" ``` ``` -------------------------------- ### POST /{repo}/-/upload/releases/{tagName} Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-contents:rw ```markdown ### Parameters - **repo** (string, path, required): repo - **tagName** (string, path, required): tag_name - **request** (dto.UploadRequestParams, body, required): UploadRequestParams ### Responses #### 200 - OK Empty response body ### Example Usage ```bash curl -X POST "https://api.example.com/{repo}/-/upload/releases/{tagName}" ``` ``` -------------------------------- ### POST /{repo}/-/git/commit-annotations-in-batch Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-code:r ```markdown ### Parameters - **repo** (string, path, required): repo - **get_commit_annotations_form** (web.GetCommitAnnotationsInBatchForm, body, required): Get Commit Annotations In Batch Form ### Responses #### 200 - OK Empty response body #### 404 - Not Found Not Found #### 500 - Internal Server Error Internal Server Error ### Example Usage ```bash curl -X POST "https://api.example.com/{repo}/-/git/commit-annotations-in-batch" ``` ``` -------------------------------- ### POST /{repo}/-/knowledge/base/query Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-code:r ```markdown ### Parameters - **repo** (string, path, required): repo - **query** (dto.QueryKnowledgeBaseReq, body, required): 查询内容 ### Responses #### 200 - OK Empty response body #### 400 - Bad Request Bad Request #### 500 - Internal Server Error Internal Server Error ### Example Usage ```bash curl -X POST "https://api.example.com/{repo}/-/knowledge/base/query" ``` ``` -------------------------------- ### POST /{repo}/-/labels Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-notes:rw ```markdown ### Parameters - **repo** (string, path, required): repo - **post_label_form** (api.PostLabelForm, body, required): Post Label Form ### Responses #### 201 - Created Empty response body #### 404 - Not Found Not Found #### 500 - Internal Server Error Internal Server Error ### Example Usage ```bash curl -X POST "https://api.example.com/{repo}/-/labels" ``` ``` -------------------------------- ### POST /{repo}/-/pulls/{number}/reviews Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-notes:rw ```markdown ### Parameters - **repo** (string, path, required): repo - **number** (string, path, required): number - **post_pull_review_form** (api.PullReviewCreationForm, body, required): Post Pull Review Form ### Responses #### 201 - Created Empty response body #### 403 - Forbidden Forbidden #### 404 - Not Found Not Found #### 500 - Internal Server Error Internal Server Error ### Example Usage ```bash curl -X POST "https://api.example.com/{repo}/-/pulls/{number}/reviews" ``` ``` -------------------------------- ### POST /{repo}/-/upload/wiki/{branchName} Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-contents:rw ```markdown ### Parameters - **repo** (string, path, required): Repo - **branchName** (string, path, required): branchName - **request** (dto.UploadRequestParams, body, required): UploadRequestParams ### Responses #### 200 - OK Empty response body ### Example Usage ```bash curl -X POST "https://api.example.com/{repo}/-/upload/wiki/{branchName}" ``` ``` -------------------------------- ### POST /{repo}/-/ai/chat/completions Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-code:r ```markdown ### Parameters - **repo** (string, path, required): 仓库完整路径 - **request** (dto.AiChatCompletionsReq, body, required): AI chat completions params ### Responses #### 200 - OK Empty response body ### Example Usage ```bash curl -X POST "https://api.example.com/{repo}/-/ai/chat/completions" ``` ``` -------------------------------- ### POST /{repo}/-/settings/branch-protections Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-manage:rw ```markdown ### Parameters - **repo** (string, path, required): repo - **branch_protection_form** (api.BranchProtection, body, required): Branch Protection Form ### Responses #### 201 - Created Empty response body #### 404 - Not Found Not Found #### 500 - Internal Server Error Internal Server Error ### Example Usage ```bash curl -X POST "https://api.example.com/{repo}/-/settings/branch-protections" ``` ``` -------------------------------- ### POST /{repo}/-/issues Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-notes:rw ```markdown ### Parameters - **repo** (string, path, required): repo - **post_issue_form** (api.PostIssueForm, body, required): Post Issue Form ### Responses #### 201 - Created Empty response body #### 404 - Not Found Not Found #### 500 - Internal Server Error Internal Server Error ### Example Usage ```bash curl -X POST "https://api.example.com/{repo}/-/issues" ``` ``` -------------------------------- ### POST /{repo}/-/releases Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-code:rw ```markdown ### Parameters - **repo** (string, path, required): repo - **create_release_form** (openapi.PostReleaseForm, body, required): Post Release Form, attachment is optional ### Responses #### 201 - Created Empty response body #### 404 - Not Found Not Found #### 500 - Internal Server Error Internal Server Error ### Example Usage ```bash curl -X POST "https://api.example.com/{repo}/-/releases" ``` ``` -------------------------------- ### POST /{repo}/-/upload/imgs Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-contents:rw ```markdown ### Parameters - **repo** (string, path, required): repo - **request** (dto.UploadRequestParams, body, required): UploadRequestParams ### Responses #### 200 - OK Empty response body ### Example Usage ```bash curl -X POST "https://api.example.com/{repo}/-/upload/imgs" ``` ``` -------------------------------- ### POST /{repo}/-/upload/files Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-contents:rw ```markdown ### Parameters - **repo** (string, path, required): repo - **request** (dto.UploadRequestParams, body, required): UploadRequestParams ### Responses #### 200 - OK Empty response body ### Example Usage ```bash curl -X POST "https://api.example.com/{repo}/-/upload/files" ``` ``` -------------------------------- ### POST /{repo}/-/badge/upload Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-commit-status:rw ```markdown ### Parameters - **repo** (string, path, required): 仓库完整路径 - **request** (dto.UploadBadgeReq, body, required): UploadBadge params ### Responses #### 200 - OK Empty response body ### Example Usage ```bash curl -X POST "https://api.example.com/{repo}/-/badge/upload" ``` ``` -------------------------------- ### POST /{repo}/-/git/tags Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-code:rw ```markdown ### Parameters - **repo** (string, path, required): repo - **post_tag_form** (api.PostTagFrom, body, required): PostTagFrom ### Responses #### 201 - Created Empty response body #### 404 - Not Found Not Found #### 500 - Internal Server Error Internal Server Error ### Example Usage ```bash curl -X POST "https://api.example.com/{repo}/-/git/tags" ``` ``` -------------------------------- ### PUT /{repo}/-/git/tag-annotations/{tag} Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-contents:rw ```markdown ### Parameters - **repo** (string, path, required): repo - **tag** (string, path, required): tag - **put_tag_annotations_form** (openapi.PutTagAnnotationsForm, body, required): Put Tag Annotations Form ### Responses #### 200 - OK Empty response body #### 404 - Not Found Not Found #### 500 - Internal Server Error Internal Server Error ### Example Usage ```bash curl -X PUT "https://api.example.com/{repo}/-/git/tag-annotations/{tag}" ``` ``` -------------------------------- ### POST /{repo}/-/issues/{number}/labels Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-notes:rw ```markdown ### Parameters - **repo** (string, path, required): repo - **number** (string, path, required): number - **post_issue_labels_form** (api.PostIssueLabelsForm, body, required): Post Issue Labels Form ### Responses #### 200 - OK Empty response body #### 404 - Not Found Not Found #### 500 - Internal Server Error Internal Server Error ### Example Usage ```bash curl -X POST "https://api.example.com/{repo}/-/issues/{number}/labels" ``` ``` -------------------------------- ### POST /{repo}/-/git/branches Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-code:rw ```markdown ### Parameters - **repo** (string, path, required): repo - **create_branch_form** (openapi.CreateBranchForm, body, required): Create BranchDetail Form ### Responses #### 201 - Created Empty response body #### 404 - Not Found Not Found #### 500 - Internal Server Error Internal Server Error ### Example Usage ```bash curl -X POST "https://api.example.com/{repo}/-/git/branches" ``` ``` -------------------------------- ### GET /{repo}/-/pulls/{number}/comments/{comment_id} Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-notes:r ```markdown ### Parameters - **repo** (string, path, required): repo - **number** (string, path, required): number - **comment_id** (string, path, required): comment_id ### Responses #### 200 - OK Empty response body #### 404 - Not Found Not Found #### 500 - Internal Server Error Internal Server Error ### Example Usage ```bash curl -X GET "https://api.example.com/{repo}/-/pulls/{number}/comments/{comment_id}" ``` ``` -------------------------------- ### POST /{repo}/-/releases/{release_id}/asset-upload-url Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-code:rw ```markdown ### Parameters - **repo** (string, path, required): repo - **release_id** (string, path, required): release id - **create_release_asset_upload_url_form** (openapi.PostReleaseAssetUploadURLForm, body, required): Post Release Asset Upload URL Form ### Responses #### 201 - Created Empty response body #### 404 - Not Found Not Found #### 500 - Internal Server Error Internal Server Error ### Example Usage ```bash curl -X POST "https://api.example.com/{repo}/-/releases/{release_id}/asset-upload-url" ``` ``` -------------------------------- ### POST /{repo}/-/releases/{release_id}/asset-upload-confirmation/{upload_token}/{asset_path} Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-code:rw ```markdown ### Parameters - **repo** (string, path, required): repo - **release_id** (string, path, required): release id - **upload_token** (string, path, required): upload token - **asset_path** (string, path, required): release asset path ### Responses #### 200 - OK Empty response body #### 404 - Not Found Not Found #### 500 - Internal Server Error Internal Server Error ### Example Usage ```bash curl -X POST "https://api.example.com/{repo}/-/releases/{release_id}/asset-upload-confirmation/{upload_token}/{asset_path}" ``` ``` -------------------------------- ### POST /{repo}/-/pulls/{number}/labels Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-notes:rw ```markdown ### Parameters - **repo** (string, path, required): repo - **number** (string, path, required): number - **post_pull_labels_form** (api.PostPullLabelsForm, body, required): Post Pull Labels Form ### Responses #### 200 - OK Empty response body #### 404 - Not Found Not Found #### 500 - Internal Server Error Internal Server Error ### Example Usage ```bash curl -X POST "https://api.example.com/{repo}/-/pulls/{number}/labels" ``` ``` -------------------------------- ### POST /{repo}/-/build/ai/auto-pr Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-code:rw ```markdown ### Parameters - **repo** (string, path, required): 仓库完整路径 - **request** (dto.AiAutoPrReq, body, required): AI auto PR params ### Responses #### 200 - OK Empty response body ### Example Usage ```bash curl -X POST "https://api.example.com/{repo}/-/build/ai/auto-pr" ``` ``` -------------------------------- ### PUT /{repo}/-/settings/push-limit Source: https://api.cnb.cool/swagger-ui/swagger.json 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-manage:rw ```markdown ### Parameters - **repo** (string, path, required): repo - **push_limit_form** (api.PushLimitSettings, body, required): Push Limit Form ### Responses #### 200 - OK Empty response body #### 404 - Not Found Not Found #### 500 - Internal Server Error Internal Server Error ### Example Usage ```bash curl -X PUT "https://api.example.com/{repo}/-/settings/push-limit" ``` ```