@cnbcool/cnb-api-generate 2.16.10 → 2.16.11
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 +9 -2
package/package.json
CHANGED
package/skills-template/SKILL.md
CHANGED
|
@@ -12,9 +12,12 @@ description: CNB 平台交互命令,支持代码仓库、Issue、PR、CI、制
|
|
|
12
12
|
## 使用约定
|
|
13
13
|
|
|
14
14
|
- **编号自识别**:Issue/PR 编号自动从环境变量识别,无需额外传递。
|
|
15
|
+
- **可显式覆盖**:`--repo <组织/仓库>` 与 `--number <编号>` 均为可选参数。
|
|
16
|
+
不传时沿用环境变量(即当前仓库的当前 Issue/PR);传入时覆盖环境变量,
|
|
17
|
+
可用于跨仓库或跨编号场景,例如 `cnb pulls get --repo x/y --number 97`、
|
|
18
|
+
`cnb issues get --number 68`。两个参数相互独立,可只传其中一个。
|
|
15
19
|
- **默认摘要省流**:默认精简输出,加 `--verbose` 输出完整数据。
|
|
16
20
|
- **多行用单引号**:bash 参数为多行文本时用单引号,降低命令注入风险。
|
|
17
|
-
- **范围限本仓**:快捷命令仅限当前仓库的当前 Issue/PR,跨仓库或跨编号请参考「更多 API」。
|
|
18
21
|
- **提及不召唤**:评论中直接 @npc 会召唤 npc;仅提及不召唤时,用反引号包裹 `@npc`。
|
|
19
22
|
NPC 的触发条件见 `cnb-npc-search`,单独 `@仓库名` 不会触发。
|
|
20
23
|
|
|
@@ -22,7 +25,11 @@ description: CNB 平台交互命令,支持代码仓库、Issue、PR、CI、制
|
|
|
22
25
|
|
|
23
26
|
评论正文里的图片、附件 URL,一律用 `get-imgs` / `get-files` 取回,URL 从 `list-comments` 原文取:
|
|
24
27
|
|
|
25
|
-
- **参数取 URL
|
|
28
|
+
- **参数取 URL 的尾段,且必须含数字 ID 段**:图片取 `/imgs/<issues|pulls>/` 之后的**完整尾段**,
|
|
29
|
+
附件取 `/files/<issues|pulls>/` 之后的完整尾段;尾段首位的数字 ID 段不能省,漏掉会返回 `404 Resource not found`:
|
|
30
|
+
- 原文 `.../-/imgs/issues/2101868753481326592/Lma2nfHjnchalMtHZcq4OA/6d7ab033-xxxx.png`
|
|
31
|
+
- 正确 `2101868753481326592/Lma2nfHjnchalMtHZcq4OA/6d7ab033-xxxx.png` ✅
|
|
32
|
+
- 漏 ID `Lma2nfHjnchalMtHZcq4OA/6d7ab033-xxxx.png` ❌ `404`
|
|
26
33
|
- **CLI 内置鉴权**:手写 `Authorization: Bearer` 或 `token` 都不被识别,只会拿到 400
|
|
27
34
|
|
|
28
35
|
## 常用链接
|