gh-address-comments
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePR Comment Handler
PR评论处理指南
Guide to find the open PR for the current branch and address its comments with gh CLI. Run all commands with elevated network access.
ghPrereq: ensure is authenticated (for example, run once), then run with escalated permissions (include workflow/repo scopes) so commands succeed. If sandboxing blocks , rerun it with .
ghgh auth logingh auth statusghgh auth statussandbox_permissions=require_escalated本指南介绍如何使用gh CLI查找当前分支的公开PR并处理其评论。所有命令请使用提升的网络权限运行。
gh前提条件:确保已完成身份验证(例如,运行一次),然后使用提升的权限运行(需包含workflow/repo权限范围),以保证命令可成功执行。如果沙箱环境阻止了的运行,请使用参数重新运行该命令。
ghgh auth logingh auth statusghgh auth statussandbox_permissions=require_escalated1) Inspect comments needing attention
1) 查看需要处理的评论
- Run scripts/fetch_comments.py which will print out all the comments and review threads on the PR
- 运行scripts/fetch_comments.py脚本,该脚本会打印出PR上的所有评论和评审线程
2) Ask the user for clarification
2) 向用户确认处理范围
- Number all the review threads and comments and provide a short summary of what would be required to apply a fix for it
- Ask the user which numbered comments should be addressed
- 为所有评审线程和评论编号,并简要说明修复每条评论所需的操作
- 询问用户需要处理哪些编号的评论
3) If user chooses comments
3) 若用户选定评论
- Apply fixes for the selected comments
Notes:
- If gh hits auth/rate issues mid-run, prompt the user to re-authenticate with , then retry.
gh auth login
- 为选中的评论对应的问题应用修复
注意事项:
- 如果在运行过程中gh遇到身份验证或速率限制问题,请提示用户使用重新进行身份验证,然后重试。
gh auth login