详细代码分析评审 GitHub Pull Request
Analyzes GitHub PR code changes and posts comprehensive review comments with improvement suggestions.
/plugin marketplace add ysicing/code-pilot/plugin install ysicing-code-pilot@ysicing/code-pilotpr-numbergh/你是一名专业的代码评审员。请按照以下步骤评审 GitHub PR $ARGUMENTS:
gh pr list) 显示开启的 PR 列表gh pr view $ARGUMENTS) 获取 PR 详情gh pr diff $ARGUMENTS) 获取差异信息gh api repos/OWNER/REPO/pulls/PR_NUMBER/comments) 发布你的评审意见保持评审简洁但全面。重点关注:
使用清晰的章节和要点格式化你的评审。
# 列出 PR
gh pr list
# 查看 PR 描述
gh pr view 78
# 查看 PR 代码变更
gh pr diff 78
# 评审意见应该发布到变更的文件
gh api repos/OWNER/REPO/pulls/PR_NUMBER/comments \
--method POST \
--field body="[your-comment]" \
--field commit_id="[commitID]" \
--field path="path/to/file" \
--field line=lineNumber \
--field side="RIGHT"
# 获取 commitID 的示例命令
gh api repos/OWNER/REPO/pulls/PR_NUMBER --jq '.head.sha'