Merge remote-tracking branch 'origin/master' into fix/1726-pac-source-artifact-sync

This commit is contained in:
Codex
2026-07-11 06:52:30 +02:00
22 changed files with 690 additions and 18 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 保持有界输出。
@@ -0,0 +1,26 @@
# 补齐 GitHub PR draft 转 ready 受控命令
- 来源:<https://github.com/pikasTech/unidesk/issues/1749>
- 触发上下文:
- <https://github.com/pikasTech/unidesk/pull/1748>
- <https://github.com/pikasTech/unidesk/issues/1745>
- 范围:
- 仅新增 `gh pr ready` 受控命令、帮助、测试与 PR 验收。
- 禁止项:
- 不修改 #1748 分支。
- 不修改运行面。
- 不建立第二套 GitHub 认证或 API authority。
## R1 [completed]
闭环 [UniDesk #1749](https://github.com/pikasTech/unidesk/issues/1749):为 [PR #1748](https://github.com/pikasTech/unidesk/pull/1748) 补齐 draft 转 ready 的受控 GitHub CLI,完成任务后将详细报告写入[任务报告](./details/github-pr-draft-ready-command/R1_Task_Report.md)。
### R1.1 [completed]
调查 [#1749](https://github.com/pikasTech/unidesk/issues/1749) 的既有 PR 命令、GraphQL client、typed 错误和输出合同,完成任务后将详细报告写入[任务报告](./details/github-pr-draft-ready-command/R1.1_Task_Report.md)。
### R1.2 [completed]
实现 [#1749](https://github.com/pikasTech/unidesk/issues/1749) 的 ready、already-ready 与 dry-run 合同,并补 scoped help,完成任务后将详细报告写入[任务报告](./details/github-pr-draft-ready-command/R1.2_Task_Report.md)。
### R1.3 [completed]
覆盖 [#1749](https://github.com/pikasTech/unidesk/issues/1749) 的成功与失败测试,使用新命令验收 [PR #1748](https://github.com/pikasTech/unidesk/pull/1748),提交非 draft PR,完成任务后将详细报告写入[任务报告](./details/github-pr-draft-ready-command/R1.3_Task_Report.md)。