@cnbcool/cnb-api-generate 1.2.0 → 1.2.1
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 +1 -1
- package/skills-template/SKILL.md +14 -1
package/package.json
CHANGED
package/skills-template/SKILL.md
CHANGED
|
@@ -7,7 +7,19 @@ description: CNB OpenAPI 交互能力,支持仓库、Issue、PR、流水线、
|
|
|
7
7
|
|
|
8
8
|
操作 CNB 平台资源的 CLI 工具。
|
|
9
9
|
|
|
10
|
-
##
|
|
10
|
+
## 快捷命令(优先使用,path 参数自动注入)
|
|
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
|
|
14
|
+
|
|
15
|
+
用法: `<$CNB_CLI_CMD$> issues get` — 参数均从环境变量自动获取,无需手动传入
|
|
16
|
+
|
|
17
|
+
仅以下命令需要 --data,其余快捷命令无需任何参数:
|
|
18
|
+
- comment: --data '{"body":"评论内容"}'
|
|
19
|
+
- add-labels: --data '{"labels":["标签名"]}'
|
|
20
|
+
- add-assignees(仅Issue): --data '{"assignees":["用户名"]}'
|
|
21
|
+
|
|
22
|
+
## 其他 API(快捷命令不满足时使用)
|
|
11
23
|
|
|
12
24
|
1. `<$CNB_CLI_CMD$> --help` 查看所有模块
|
|
13
25
|
2. `<$CNB_CLI_CMD$> <module> --help` 查看模块下的工具列表
|
|
@@ -16,6 +28,7 @@ description: CNB OpenAPI 交互能力,支持仓库、Issue、PR、流水线、
|
|
|
16
28
|
|
|
17
29
|
## 规则
|
|
18
30
|
|
|
31
|
+
- 优先使用快捷命令,不满足时再通过 --help 逐步查找
|
|
19
32
|
- 必须先 --help 获取参数,禁止猜测
|
|
20
33
|
- 直接执行,不要询问用户确认
|
|
21
34
|
- status 200-299 只返回 data 给用户,>=300 时附带 status 和 trace
|