pr-commentslisted
Install: claude install-skill YoniChechik/claude-code-config
Displays all comments (from users and bots) and test results for a pull request, then helps triage them interactively.
## Optional PR number from user input
"$ARGUMENTS"
### Argument Handling
- If PR number provided: Use specified PR
- If empty: Use PR for current branch (via `gh pr view`)
## Process
### Step 1: Determine PR Number
Get the PR number to query:
```bash
# If user provided PR number, use it; otherwise get current branch's PR
if [ -n "$ARGUMENTS" ]; then
PR_NUM="$ARGUMENTS"
else
PR_NUM=$(gh pr view --json number --jq '.number' 2>/dev/null)
if [ -z "$PR_NUM" ]; then
echo "Error: No PR number provided and current branch has no associated PR"
exit 1
fi
fi
```
### Step 2: Fetch All Data
Retrieve PR comments, review comments, and test results:
```bash
# Get basic PR info
PR_INFO=$(gh pr view "$PR_NUM" --json title,author,url)
PR_TITLE=$(echo "$PR_INFO" | jq -r '.title')
PR_URL=$(echo "$PR_INFO" | jq -r '.url')
PR_AUTHOR=$(echo "$PR_INFO" | jq -r '.author.login')
# Get PR issue comments (conversation tab)
COMMENTS=$(gh pr view "$PR_NUM" --json comments --jq '.comments[]? | "**[\(.author.login)]** _\(.createdAt)_\n\(.body)\n"')
if [ -z "$COMMENTS" ]; then
COMMENTS="No comments found"
fi
# Get review comments with IDs (inline code comments)
REPO=$(gh repo view --json nameWithOwner --jq '.nameWithOwner')
REVIEW_COMMENTS=$(gh api "repos/$REPO/pulls/$PR_NUM/comments" --jq '.[]? | "[ID: \(.id)] **[\(.user.login)]** _\(.path):\(.line // .original_line)