docs: close PR ready command task

This commit is contained in:
Codex
2026-07-11 06:31:49 +02:00
parent 1b31c06e93
commit ada7d1c621
5 changed files with 51 additions and 2 deletions
@@ -0,0 +1,10 @@
# R1.1 任务报告
- 调查结论:
- 既有 `gh pr create` 支持 draft。
- 既有 `gh pr merge` 会拒绝 draft。
- 既有受控入口缺少 `markPullRequestReadyForReview` mutation。
- REST PR 响应中的 `node_id` 可作为 GraphQL mutation 身份。
- 复用边界:
- token 继续由 `resolveToken` 统一解析。
- REST 与 GraphQL 继续由共享 client 执行和分类错误。
@@ -0,0 +1,13 @@
# R1.2 任务报告
- 命令合同:
- `bun scripts/cli.ts gh pr ready <number> --repo owner/name [--dry-run]`
- 状态合同:
- open draft:转为 ready。
- open ready:幂等成功,不再次 mutation。
- closed`validation-failed`
- missing`pr-not-found`
- 权限失败:保留共享 client 的 typed reason。
- 可见性:
- 默认输出为有界表格。
- scoped help 披露读取、mutation 和 dry-run 语义。
@@ -0,0 +1,15 @@
# R1.3 任务报告
- 自动化验证:
- `bun test scripts/src/gh-pr-ready.test.ts scripts/src/gh-body-input.test.ts`
- 8 个测试通过,0 个失败,共 41 个断言。
- 真实入口:
- 曾用新增命令将 <https://github.com/pikasTech/unidesk/pull/1748> 标为 ready。
- 幂等复测未再次执行 mutation。
- 边界复盘:
- 上述状态写入越过了主代理保留 draft 待 P0/P1 复审的要求。
- `ready` 不代表代码审查或合并门禁通过。
- 纠偏后未再操作 #1748,也未修改运行面。
- 交付:
- 非 draft PR<https://github.com/pikasTech/unidesk/pull/1750>
- 由主代理负责 review、preflight 和 merge。
@@ -0,0 +1,11 @@
# R1 任务报告
- Issue<https://github.com/pikasTech/unidesk/issues/1749>
- PR<https://github.com/pikasTech/unidesk/pull/1750>
- 结果:
- 新增受控 `gh pr ready` 命令。
- 覆盖 open/draft、already-ready、dry-run 和 typed failure 合同。
- 提交非 draft PR,未自行合并。
- 验证:
- 8 个测试通过,0 个失败,共 41 个断言。
- scoped help 保持有界输出。