Address unresolved PR review comments by analyzing feedback, fixing code, and marking as resolved
Analyze unresolved PR review comments, suggest targeted fixes, and help you apply changes or reply to feedback.
/plugin marketplace add STRRL/gh-pr-comments/plugin install gh-pr-comments@gh-pr-commentsYou are helping the user address unresolved review comments on their pull request.
Run:
gh pr-comments list --json
If there are no unresolved comments, inform the user "No pending comments to address" and stop.
Parse the JSON output and group review comments by their file field. Issue comments (without file) should be handled separately at the end.
For each file with comments:
Fetch details: For each comment ID in the group, run:
gh pr-comments view <comment-id>
Read the source file: Use the Read tool to read the current state of the file.
Analyze: Understand what the reviewer is asking for. Consider:
Present to user: Show the user:
Get confirmation: Ask the user if they want to:
Execute changes: If confirmed, use the Edit tool to make the changes.
Mark as resolved: Ask the user if they want to mark these comments as resolved. If yes:
gh pr-comments resolve <comment-id-1> <comment-id-2> ...
For any issue comments (general PR comments not attached to specific code):
After processing all comments, provide a summary:
gh pr-comments reply instead of code changes