feat(mcp): add get_reviews tool for PR review submissions#1021
Merged
Conversation
Adds a new `get_reviews` MCP tool that fetches PR review submissions (the body text and verdict submitted via the "Submit review" flow). This is distinct from inline review comments (get_review_comments) and PR comments (get_pr). The pr-prompt now cross-references review submissions against inline comments to identify truly unresolved feedback, preventing false reports when findings have already been addressed via a review submission. Also normalizes `pullRequestReviewId` from number to string for provider-agnostic ID handling, adds NaN guard on PR number parsing, and instructs agents to reply inline to specific comment threads rather than posting standalone reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
get_reviewsMCP tool that fetches PR review submissions (verdicts + body text from the "Submit review" flow), distinct from inline review comments and PR commentspr-prompt.txtto cross-reference review submissions against inline comments before reporting feedback as "unresolved" — prevents false reports when findings have already been addressedpullRequestReviewIdfromnumbertostringfor provider-agnostic ID handling across the VCS abstractionget_reviewshandlerin_reply_to) rather than posting standalone reviewsgetReviewSubmissionsto BitBucket VCS provider (BitBucket has no equivalent "Submit review" flow)Test plan
getReviewSubmissionsinGitHubIssueManagementProvider.test.ts(normal response, empty body, empty list, repo override, default repo, invalid PR number, null user)pullRequestReviewIdtest assertions updated for string type