跳转到内容

cnb-rs repo branch view

cnb-rs repo branch view <BRANCH>

查看分支详情,含最新 commit 信息。

参数

  • <BRANCH>: 分支名(必填)

继承的全局选项:

  • --repo <REPO>: 指定仓库路径
  • --json: JSON 输出

输出字段

  • Name — 分支名
  • Locked — 是否锁定
  • Protected — 是否有保护规则
  • Commit SHA — 分支指向的最新 commit
  • Commit Msg — commit 消息首行
  • Author — commit author 用户名

示例

bash
cnb-rs --repo wwvo/cnb-rs/cnb-rs repo branch view main

API

步骤API方法
查分支${CNB_API_ENDPOINT}/{repo}/-/git/branches/{branch}GET

另请参阅

Released under the MIT License.