Loading...
Loading...
Compare original and translation side by side
gh apigh apigh pr view --json number,title,headRefName --jq '{number, title, headRefName}'gh pr view --json number,title,headRefName --jq '{number, title, headRefName}'undefinedundefined
**Step 2: Validate each comment**
For EACH comment:
1. Read the actual file and line referenced
2. Test the reviewer's claim (does the issue actually exist?)
3. Classify:
- **VALID**: Claim verified, fix needed
- **INVALID**: Claim does not match actual code state
- **NEEDS-DISCUSSION**: Subjective or design-level feedback
**Gate**: Every comment classified with evidence. Proceed only when gate passes.
**步骤2:验证每条评论**
针对**每条**评论:
1. 读取评论引用的实际文件和行
2. 验证评审者的主张(问题是否确实存在?)
3. 分类:
- **VALID(有效)**:主张已验证,需要修复
- **INVALID(无效)**:主张与实际代码状态不符
- **NEEDS-DISCUSSION(需讨论)**:主观或设计层面的反馈
**准入条件**:所有评论已完成分类并附验证依据。仅当满足条件时才可继续。PR #{number}: "{title}"
Comments to address: {N} VALID, {N} INVALID, {N} NEEDS-DISCUSSION
Will fix:
1. [VALID] src/auth.go:42 - "Add nil check for user"
2. [VALID] src/utils.go:15 - "Remove unused import"
Will skip:
3. [INVALID] src/api.go:99 - "URL is outdated" (verified: URL returns 200)
Needs discussion:
4. [DISCUSS] src/db.go:55 - "Consider using transaction"
Proceed with fixes?PR #{number}: "{title}"
需处理的评论:{N}条有效,{N}条无效,{N}条需讨论
将修复:
1. [VALID] src/auth.go:42 - "为user添加空值检查"
2. [VALID] src/utils.go:15 - "移除未使用的导入"
将跳过:
3. [INVALID] src/api.go:99 - "URL已过时"(验证:URL返回200状态码)
需讨论:
4. [DISCUSS] src/db.go:55 - "考虑使用事务"
是否继续修复?undefinedundefinedundefinedundefinedPR FIX COMPLETE
Fixed: {N} issues
Skipped: {N} (invalid)
Pending: {N} (needs discussion)
Commit: {hash} "Address PR review comments"
Pushed to: origin/{branch}
PR: https://github.com/{owner}/{repo}/pull/{number}
Remaining:
- Discuss {topic} in {file}:{line} with reviewerPR修复完成
已修复:{N}个问题
已跳过:{N}个(无效)
待处理:{N}个(需讨论)
提交记录:{hash} "处理PR评审评论"
已推送至:origin/{branch}
PR地址:https://github.com/{owner}/{repo}/pull/{number}
剩余事项:
- 与评审者讨论{file}:{line}处的{topic}ghgh auth statusgh pr list --head {branch}ghgh auth statusgh pr list --head {branch}| Rationalization | Why It's Wrong | Required Action |
|---|---|---|
| "Reviewer must be right, just fix it" | Reviewers make mistakes too | Validate claim against code |
| "Small comment, no need to verify" | Small mistakes cause real bugs | Validate every comment |
| "I'll fix extra things while I'm here" | Scope creep derails PR reviews | Fix only what was requested |
| "One commit per fix is cleaner" | Multiple small commits clutter history | Single commit for all fixes |
| 合理化借口 | 错误原因 | 要求操作 |
|---|---|---|
| "评审者肯定是对的,直接修复就行" | 评审者也会犯错 | 针对代码验证主张 |
| "评论很小,不需要验证" | 小错误也会导致真实bug | 验证每条评论 |
| "我顺便修复其他问题" | 范围扩大会偏离PR评审的目标 | 仅修复要求的内容 |
| "每个修复对应一个提交更清晰" | 多个小提交会混乱历史 | 所有修复合并为一个提交 |