feat(tool_github): add pr_review_context one-shot PR review preset - #2019
bhanuaravind9549 wants to merge 1 commit into
Conversation
Return PR metadata, changed files, unified diff, and related open PRs/issues (matched by ticket IDs and file basenames) in a single tool call for review agents. Fixes rocketride-org#1852
|
Caution Review failedFailed to post review comments. GitHub was unavailable or timed out while CodeRabbit was posting the review. Please request a new review later if the pull request still needs one. This happened while posting 3 inline comments. Use ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan includes up to 8 reviews per rolling hour; 7 remain after this review. 🧰 Additional context used📓 Path-based instructions (3)**/*.py📄 CodeRabbit inference engine (.cursorrules)
Files:
nodes/**/*.py⚙️ CodeRabbit configuration file
Files:
nodes/src/nodes/*/README.md📄 CodeRabbit inference engine (AGENTS.md)
Files:
🧠 Learnings (29)📓 Common learnings📚 Learning: 2026-03-24T21:28:07.433ZApplied to files:
📚 Learning: 2026-03-25T16:11:50.206ZApplied to files:
📚 Learning: 2026-03-27T23:31:51.042ZApplied to files:
📚 Learning: 2026-03-30T21:57:11.296ZApplied to files:
📚 Learning: 2026-03-30T22:18:48.072ZApplied to files:
📚 Learning: 2026-04-02T13:09:51.916ZApplied to files:
📚 Learning: 2026-04-03T04:00:08.250ZApplied to files:
📚 Learning: 2026-04-03T05:20:16.219ZApplied to files:
📚 Learning: 2026-04-03T18:31:22.345ZApplied to files:
📚 Learning: 2026-04-03T18:31:20.227ZApplied to files:
📚 Learning: 2026-04-03T18:31:34.956ZApplied to files:
📚 Learning: 2026-04-08T07:11:59.835ZApplied to files:
📚 Learning: 2026-04-23T09:43:35.158ZApplied to files:
📚 Learning: 2026-05-18T11:51:47.483ZApplied to files:
📚 Learning: 2026-05-20T14:02:50.466ZApplied to files:
📚 Learning: 2026-06-13T07:37:27.809ZApplied to files:
📚 Learning: 2026-04-02T20:29:16.277ZApplied to files:
📚 Learning: 2026-06-05T22:02:43.464ZApplied to files:
📚 Learning: 2026-08-06T00:22:29.283ZApplied to files:
📚 Learning: 2026-04-15T00:13:11.455ZApplied to files:
📚 Learning: 2026-05-18T11:51:47.483ZApplied to files:
📚 Learning: 2026-05-20T14:18:46.136ZApplied to files:
📚 Learning: 2026-06-15T16:17:16.443ZApplied to files:
📚 Learning: 2026-07-13T03:20:23.329ZApplied to files:
📚 Learning: 2026-07-19T23:37:30.816ZApplied to files:
📚 Learning: 2026-04-10T16:35:23.430ZApplied to files:
📚 Learning: 2026-06-02T14:51:49.020ZApplied to files:
📚 Learning: 2026-07-30T01:20:00.423ZApplied to files:
📝 WalkthroughWalkthroughChangesThe GitHub tool adds GitHub PR review context
Estimated code review effort: 4 (Complex) | ~45 minutes Merge Risk: 🟡 Moderate · up to The new one-shot review context can omit files or related work beyond the first page and can report unrelated pull requests when filenames merely appear in their text, resulting in incomplete or misleading review context. These correctness issues should be fixed before merging. Sequence Diagram(s)sequenceDiagram
participant ReviewAgent
participant pr_review_context
participant github_client.call
participant GitHub_API
ReviewAgent->>pr_review_context: request PR review context
pr_review_context->>github_client.call: retrieve PR metadata and files
github_client.call->>GitHub_API: fetch PR data
pr_review_context->>github_client.call: retrieve raw unified diff
github_client.call->>GitHub_API: fetch diff with diff Accept header
pr_review_context->>github_client.call: retrieve open PRs and issues
github_client.call->>GitHub_API: fetch related candidates
pr_review_context-->>ReviewAgent: return assembled review context
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🤖 Internal: Discord sync markerAuto-managed by the Discord notification workflow. Stores the linked Discord message ID and forum thread ID. Do not edit or delete. |
|
Two process things and one behavioural one.
|
|
@bhanuaravind9549 thanks for the work on this, but we're going to close it. The reason is design direction rather than anything wrong with the implementation. We want the GitHub tool catalog to stay a set of small tools that each do one job well, instead of adding larger tools that combine existing ones. pr_review_context bundles calls we already have (PR metadata, changed files, the diff, related issue search), so it The underlying issue (#1852) also hadn't been approved or prioritized before the work started, which is on us rather than on you. Sorry for the wasted time. |
Summary
pr_review_context(pr_number)ontool_githubthat returns PR metadata, changed files, unified diff, and related open PRs/issues in one call#N, Fixes/Closes/Refs) and overlapping changed-file basenamesgithub_client.callwithaccept=/raw=Fixes #1852
Test plan
pytest nodes/test/tool_github/test_pr_review_context.py -v --noconftestpr_review_contextand confirm diff + files + related issues populateSummary by CodeRabbit
New Features
Documentation