Badge

上传徽章数据。Upload badge data.

上传 CI/CD 徽章数据(如构建状态、覆盖率等)到指定仓库。 Upload CI/CD badge data (e.g., build status, coverage) to the specified repository. 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-commit-status:rw

post/{repo}/-/badge/upload

Request

  • Base URL: https://api.cnb.cool (the document declares no server; this is the origin it was published from)
  • URL: https://api.cnb.cool/{repo}/-/badge/upload
  • Auth: API key in header Authorization

Path parameters

repostring required

仓库完整路径。Full repository path.

Request body

keystring

徽章 key。目前允许上传的 key 包括:security/tca。Badge key. Allowed keys include: security/tca.

latestboolean

是否上传 latest 徽章,默认 false。Whether to upload the latest badge; default false.

linkstring

点击徽章右侧的跳转链接。Badge right side click redirect link.

messagestring

徽章右侧显示内容。Badge right side display content.

shastring

提交SHA。Commit SHA.

valueinteger

徽章数值,不传默认用 message 代替。Badge numeric value; defaults to message when omitted.

Response

OK

Changes

No recorded changes to this operation across all 1 revision of this API.