跳转到内容

cnb-rs commit annotation

cnb-rs commit annotation <command> [options]

管理 commit 元数据(key/value annotations)。

CNB 允许给任意 commit 附加 key=value 元数据,常用场景:

  • 标记部署目标(deploy=prodregion=us-east
  • 关联评审人 / 审批人(reviewer=aliceapproved-by=bob
  • 业务标签(feature=billinghotfix=true

可用命令

示例

bash
# 设置 2 个 annotation
$ cnb-rs commit annotation set 349be5a 'deploy=prod' 'reviewer=alice'

# 列出当前 annotations
$ cnb-rs commit annotation list 349be5a
KEY        VALUE
deploy     prod
reviewer   alice

# 删除单个 key
$ cnb-rs commit annotation rm 349be5a deploy -y

另请参阅

Released under the MIT License.