feat: add gh_bot_review tool to parse AI bot findings #22#25
Conversation
|
Caution Review failedThe pull request is closed. Recent review infoRun configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: Files selected for processing (3)
WalkthroughWalkthroughA new Changesgh_bot_review tool implementation
Sequence Diagram(s)sequenceDiagram
participant Caller
participant ghBotReviewTool
participant GitHubAPI
participant parseBotContent
Caller->>ghBotReviewTool: execute({ pr, repo, bot })
ghBotReviewTool->>GitHubAPI: GET /repos/{repo}/pulls/{pr}/reviews (jq)
GitHubAPI-->>ghBotReviewTool: review items[]
ghBotReviewTool->>GitHubAPI: GET /repos/{repo}/issues/{pr}/comments (jq)
GitHubAPI-->>ghBotReviewTool: comment items[]
loop each bot item
ghBotReviewTool->>parseBotContent: body, username
parseBotContent-->>ghBotReviewTool: BotFinding[]
end
ghBotReviewTool-->>Caller: JSON findings | "no bot findings" | error string
Estimated code review effort3 (Moderate) | ~25 minutes Possibly related issues
Finishing TouchesGenerate docstrings
Generate unit tests (beta)
Simplify code
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install timed out. The project may have too many dependencies for the sandbox. Comment |
Summary
Implements the
gh_bot_reviewsupertool that parses AI bot review comments (coderabbitai, cubic-dev-ai, dependabot) on a PR and extracts structured, actionable findings. Enables agents to autonomously respond to bot feedback in the "bot finds → agent checks → bot verifies" cycle.Parsers
In \@`:\n- Line : `) with type classification (peer_dependency, security, nitpick, meta)<file name="..."><violation location="...:N">P1/P2: description</violation></file>)Bumps <pkg> from <old> to <new>)Args
pr(number, required): PR number to checkrepo(string, optional): owner/repo format (auto-detected from git remote)bot(string, optional): Filter by bot name ("coderabbitai", "cubic-dev-ai", "dependabot", default "all")Output
JSON array of structured BotFinding objects with: bot, type, severity, file, line, description, suggestion, actionable
Test Results
All 29 tests passing across 4 describe blocks:
Closes #22
Summary by cubic
Adds the
gh_bot_reviewtool to parse bot review comments on a PR and return structured JSON findings. Helps agents quickly triage feedback and act on what matters.gh_bot_reviewtool wired into supertools registry.coderabbitai(inline),cubic-dev-ai(XML), anddependabot(bump) comment formats.pr(required),repo?,bot?filter; reads both PR reviews and issue comments.Written for commit 9687506. Summary will update on new commits.
Summary by CodeRabbit