Fetch bot review comments from a PR and evaluate with receive-feedback skill
Fetches review comments from a bot on a PR and processes them through the receive-feedback skill for evaluation. Use this to automatically analyze and act on automated code review feedback from tools like CodeRabbit.
/plugin marketplace add existential-birds/beagle/plugin install beagle@existential-birdsFetch review comments from a bot reviewer on the current PR, format them, and evaluate using the receive-feedback skill.
/beagle:fetch-pr-feedback [--bot <username>] [--pr <number>]
Flags:
--bot <username> - Bot/reviewer to fetch comments from (default: coderabbitai[bot])--pr <number> - PR number to target (default: current branch's PR)Extract flags from $ARGUMENTS:
--bot <username> or default to coderabbitai[bot]--pr <number> or detect from current branch# If --pr was specified, use that number directly
# Otherwise, get PR for current branch:
gh pr view --json number,headRefName,url
# Get repo owner/name:
gh repo view --json nameWithOwner --jq '.nameWithOwner'
If no PR exists for current branch, fail with: "No PR found for current branch. Use --pr to specify a PR number."
Fetch both types of comments (use --paginate to get all):
Issue comments (summary/walkthrough posts):
gh api --paginate "repos/{owner}/{repo}/issues/{number}/comments" \
--jq '.[] | select(.user.login == "{bot}") | .body'
Review comments (line-specific):
gh api --paginate "repos/{owner}/{repo}/pulls/{number}/comments" \
--jq '.[] | select(.user.login == "{bot}") | "---\nFile: \(.path):\(.line // .original_line)\n\(.body)\n"'
Strip noise from the content:
<details> blocks containing "Learnings" or AI command hintsStructure the output:
# PR Feedback from {bot}
## Summary/Overview
[All issue comments here - there may be multiple]
## Line-Specific Comments
[All review comments here, each prefixed with "File: path:line"]
If no comments found, output: "No comments from {bot} found on this PR."
Use the Skill tool to load the receive-feedback skill: Skill(skill: "beagle:receive-feedback")
Then process the formatted feedback document:
# Fetch CodeRabbit comments on current branch's PR (default)
/beagle:fetch-pr-feedback
# Fetch from a different bot
/beagle:fetch-pr-feedback --bot renovate[bot]
# Fetch from a specific PR
/beagle:fetch-pr-feedback --pr 123
# Combined
/beagle:fetch-pr-feedback --bot coderabbitai[bot] --pr 456