跳转到内容

cnb-rs mission view config set

cnb-rs mission view config set <mission> --file <path>
cnb-rs mission view config set <mission> --stdin

设置指定视图的配置(fields / 筛选 / 排序 / 分组),从 JSON 文件或 stdin 读取。

常见工作流:先用 view config show 拿现有配置 → 改 JSON → 用 view config set --file 推回。

支持两种输入方式:通过 --file 指定 JSON 文件,或通过 --stdin 从标准输入读取。

选项

  • <mission>: 任务集路径,格式 group/mission(必填)
  • --file <PATH>: 从 JSON 文件读取配置
  • --stdin: 从标准输入读取配置

继承的全局选项:

  • --domain <DOMAIN>: 指定目标域名(默认:cnb.cool

示例

bash
# 从文件读取配置
$ cnb-rs mission view config set my-org/sprint-2025-q1 --file view-config.json

# 从标准输入读取
$ cat view-config.json | cnb-rs mission view config set my-org/sprint-2025-q1 --stdin

# “读→改→推”工作流
$ cnb-rs mission view config show my-org/sprint-2025-q1 --id v1 --json > c.json
$ vi c.json
$ cnb-rs mission view config set my-org/sprint-2025-q1 --file c.json

另请参阅

Released under the MIT License.