Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Fetches a pull request's line-level review comments via the GitHub CLI and formats them by file, line and thread.
50% 86%+36 ptsof test cases passed
Passed 19 of 22 test cases with the skill, and 11 of 22 without it.
3 of 3 safety checks passed
Not used yet
Get nicely formatted review comments for a pull request, grouped by file and line with proper comment threading.
Determine PR number: If not provided, look up the associated PR for the current branch using:
gh pr view --json number --jq '.number'
Get formatted review comments: Use the GitHub API to fetch and format all line-specific review comments:
gh api repos/:owner/:repo/pulls/{PR_NUMBER}/comments --jq '
group_by(.path, .line) |
map({
path: .[0].path,
line: .[0].line,
comments: sort_by(.created_at)
}) |
sort_by(.path, .line) |
map(
"**\(.path)**\n Line \(.line):" +
(.comments |
map(
if .in_reply_to_id then
" | \(.user.login): \(.body)"
else
" (\(.user.login)): \(.body)"
end
) |
join("\n")) + "\n"
) |
join("\n")
'
The formatted command produces output like:
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.