跳转到内容

cnb-rs commit status

cnb-rs commit status <REF>

显示指定 commit 的检查状态列表(CI / 代码扫描 / 部署等 status check 结果)。

选项

  • <REF>: Commit SHA / 分支 / tag(必填)

继承的全局选项:

  • --repo <REPO>: 指定仓库路径
  • --domain <DOMAIN>: 指定目标域名
  • --json: 输出原始 Vec<BffApiCommitStatus>

输出列

含义
STATE状态结果(如 success / pending / failure / error
CONTEXT状态上下文标识(如 ci/buildcoverage
UPDATED最后更新时间(RFC3339 → 本地)
DESCRIPTION状态描述(如「构建成功」「测试失败」)

示例

bash
# 查 main 分支当前 status
$ cnb-rs commit status main

# 查具体 commit 的 status
$ cnb-rs commit status 349be5a

# JSON 拿 target_url 等扩展字段
$ cnb-rs --json commit status main | jq '.[].target_url'

# 没有 status 时友好提示
$ cnb-rs commit status 349be5a
Commit 349be5a 下没有检查状态

另请参阅

Released under the MIT License.