groove-groovebook-review
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesegroove-groovebook-review
groove-groovebook-review
Outcome
结果
Open learning PRs in the groovebook repo are listed; the user reviews one and submits a reaction (approve, comment, or request changes).
列出groovebook仓库中的公开学习类PR;用户审核其中一个并提交反馈(批准、评论或请求变更)。
Acceptance Criteria
验收标准
- Open PRs are listed with title, author, and date
- User selects a PR to review; diff and body are shown
- User submits a reaction via
gh pr review
- 公开PR会展示标题、作者和日期信息
- 用户选择要审核的PR后,展示diff和正文内容
- 用户通过提交反馈
gh pr review
Steps
步骤
-
Readfrom
groovebook:; if absent, exit with:.groove/index.mdgroovebook is not configured. Add 'groovebook: <owner>/<repo>' to .groove/index.md to enable. -
Check; if not authenticated, exit with:
gh auth statusNot authenticated with GitHub. Run: gh auth login -
List open PRs:
gh pr list --repo <groovebook> --state open --json number,title,author,createdAt- If none open: print "No open learning PRs in <groovebook>." and exit
- Display as a numbered list:
N. #<number> — <title> (by <author>, <date>)
-
Ask: "Which PR would you like to review? (enter number or PR #)"
-
Show the PR:
- — show body
gh pr view <number> --repo <groovebook> - — show diff
gh pr diff <number> --repo <groovebook>
-
Ask: "Your reaction? (approve / comment / request-changes)"
- If : ask for the comment text
comment - If : ask for the request text
request-changes - If : confirm intent
approve
- If
-
Submit:
gh pr review <number> --repo <groovebook> --<approve|comment|request-changes> --body "<text>"For approve:gh pr review <number> --repo <groovebook> --approve -
Confirm submission and print the PR URL.
-
Optional follow-up: ask "Does this learning suggest a change to a groove skill? If so, consider opening a companion PR to the groove repo referencing this groovebook PR."
-
从中读取
.groove/index.md配置;如果不存在,退出并提示:groovebook:groovebook is not configured. Add 'groovebook: <owner>/<repo>' to .groove/index.md to enable. -
检查;如果未完成认证,退出并提示:
gh auth statusNot authenticated with GitHub. Run: gh auth login -
列出公开PR:
gh pr list --repo <groovebook> --state open --json number,title,author,createdAt- 如果没有公开PR:打印"No open learning PRs in <groovebook>."并退出
- 按编号列表展示:
N. #<number> — <title> (by <author>, <date>)
-
询问:"你想要审核哪个PR?(输入编号或PR号)"
-
展示PR内容:
- — 展示PR正文
gh pr view <number> --repo <groovebook> - — 展示PR diff
gh pr diff <number> --repo <groovebook>
-
询问:"你的反馈是?(approve / comment / request-changes)"
- 如果选择:询问评论内容
comment - 如果选择:询问变更请求内容
request-changes - 如果选择:确认用户操作意图
approve
- 如果选择
-
提交反馈:
gh pr review <number> --repo <groovebook> --<approve|comment|request-changes> --body "<text>"批准场景:gh pr review <number> --repo <groovebook> --approve -
确认提交成功并打印PR URL。
-
可选后续操作:询问"本次学习是否表明需要对某个groove技能进行变更?如果是的话,可以考虑向groove仓库提交关联PR,引用本次groovebook PR。"
Constraints
约束
- Read-only until step 7 — do not modify any local files
- If output is very large (>200 lines), show only the first 50 lines and note it's truncated
gh pr diff - The reaction should always ask for confirmation before submitting — approvals are harder to undo than comments
approve
- 步骤7之前均为只读操作,不得修改任何本地文件
- 如果输出内容过大(超过200行),仅展示前50行并提示内容已截断
gh pr diff - 操作提交前必须要求用户确认,因为批准操作比评论更难撤销
approve