Badge
获取徽章数据。Get badge data.
根据 commit SHA 和徽章名称获取徽章 SVG 或 JSON 数据。 Get badge SVG or JSON data by commit SHA and badge name. 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-commit-status:r
get/{repo}/-/badge/git/{sha}/{badge}
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/git/{sha}/{badge}
- Auth: API key in header Authorization
Path parameters
repostring required
仓库完整路径。Full repository path.
shastring required
latest 或 commit 8 位短 hash(例如 89d48c07)。latest or 8-char short commit hash (e.g. 89d48c07).
badgestring required
徽章名,例如 pr 事件徽章名为:ci/status/pull_request, 如需获取 JSON 数据,可加上 .json 后缀,如:ci/status/pull_request.json
Request body
Response
OK
Changes
No recorded changes to this operation across all 1 revision of this API.