@cnbcool/cnb-api-generate 1.2.2 → 1.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cnbcool/cnb-api-generate",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "main": "./built/index.js",
5
5
  "module": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -7,21 +7,22 @@ description: CNB OpenAPI 交互能力,支持仓库、Issue、PR、流水线、
7
7
 
8
8
  操作 CNB 平台资源的 CLI 工具。
9
9
 
10
- ## 快捷命令(优先使用,path 参数自动注入)
10
+ ## 快捷命令(优先使用)
11
11
 
12
- Issue 模块: get, list-comments, comment, close, open, list-labels, add-labels, list-assignees, add-assignees
13
- PR 模块: get, list-files, list-commits, list-comments, comment, list-labels, add-labels, check-status, list-reviews, list-assignees
12
+ issues 模块: get, list-comments, comment, close, open, list-labels, add-labels, list-assignees, add-assignees
13
+ pulls 模块: get, list-files, list-commits, list-comments, comment, list-labels, add-labels, check-status, list-reviews, list-assignees
14
14
 
15
- 用法: `<$CNB_CLI_CMD$> issues get`参数均从环境变量自动获取,无需手动传入
16
- 不确定快捷命令名称时执行 `<$CNB_CLI_CMD$> --short` 查看
15
+ 用法: `<$CNB_CLI_CMD$> <module> <command>`路径参数已从环境变量自动注入,**禁止传入编号、slug 等位置参数**。
16
+ - `<$CNB_CLI_CMD$> issues get --summary` / `<$CNB_CLI_CMD$> issues list-comments`
17
+ - ✅ `<$CNB_CLI_CMD$> pulls get --summary` / `<$CNB_CLI_CMD$> pulls list-comments`
17
18
 
18
- --summary: 只输出核心摘要字段,不需要完整详情时应优先添加。支持的命令:
19
- - Issue: get, close, open, add-assignees
20
- - PR: get, list-files, list-commits
19
+ **仅需要获取摘要信息时加 --summary**,减少输出噪音:
20
+ - issues: get, close, open, add-assignees
21
+ - pulls: get, list-files, list-commits
21
22
 
22
23
  仅以下命令需要 --data,其余快捷命令无需任何参数:
23
- - comment: --data '{"body":"评论内容"}'
24
- - add-labels: --data '{"labels":["标签名"]}'
24
+ - comment: --data '{"body":"内容"}'
25
+ - add-labels: --data '{"labels":["标签"]}'
25
26
  - add-assignees(仅Issue): --data '{"assignees":["用户名"]}'
26
27
 
27
28
  ## 其他 API(快捷命令不满足时使用)