cnb-rs commit annotation
cnb-rs commit annotation <command> [options]管理 commit 元数据(key/value annotations)。
CNB 允许给任意 commit 附加 key=value 元数据,常用场景:
- 标记部署目标(
deploy=prod、region=us-east) - 关联评审人 / 审批人(
reviewer=alice、approved-by=bob) - 业务标签(
feature=billing、hotfix=true)
可用命令
- cnb-rs commit annotation list — 列出指定 commit 的所有 annotations
- cnb-rs commit annotation set — 设置 / 覆盖 annotations(支持一次多个
key=value) - cnb-rs commit annotation delete — 删除指定 key(alias
rm)
示例
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