feat: add get_reviewers and get_status_checks to pull_request_read#2639
Open
salakonrad wants to merge 2 commits into
Open
feat: add get_reviewers and get_status_checks to pull_request_read#2639salakonrad wants to merge 2 commits into
salakonrad wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds new pull request tool methods to retrieve requested reviewers and a unified status-checks view (commit statuses + check runs), with accompanying minimal response types.
Changes:
- Extend pull request tool method enum + dispatcher to support
get_reviewersandget_status_checks. - Implement
GetPullRequestReviewersandGetPullRequestStatusChecksin the GitHub PR tool. - Add minimal JSON output types for reviewers and combined status/check data.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| pkg/github/pullrequests.go | Adds tool methods and implementations for requested reviewers and unified status checks. |
| pkg/github/minimal_types.go | Introduces minimal response structs for reviewers and combined status/checks output. |
salakonrad
force-pushed
the
feat/pr-reviewers-and-status-checks
branch
4 times, most recently
from
July 16, 2026 10:05
9a10a8b to
7c277bf
Compare
…_read Extends the pull_request_read tool with two new methods: - get_reviewers: returns pending reviewer requests (both individual users and teams) using the PullRequests.ListReviewers API. This fills a gap in the existing toolset — requested team reviewers were previously not exposed anywhere in the MCP server. - get_status_checks: returns a unified view of all status checks for a PR's head commit by combining legacy commit statuses (e.g. Atlantis plan/policy results) and modern GitHub Actions check runs into a single response with a top-level combined_state. New output types added to minimal_types.go: - MinimalReviewerUser, MinimalReviewerTeam, MinimalPRReviewers - MinimalCommitStatus, MinimalStatusChecks Adds unit tests for both methods (success and API-failure paths), regenerates the pull_request_read toolsnap, and updates the generated README tool documentation. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Resolve Copilot review comments on get_status_checks: - Fix response body leak: deferred closures captured the reused `resp` variable, so earlier bodies were never closed. Add a closeStatusResponse helper that closes each body synchronously. - Paginate GetCombinedStatus and ListCheckRunsForRef so the unified view includes all statuses and check runs, not just the first page. - Collapse the duplicated status-error handling into the shared helper.
salakonrad
force-pushed
the
feat/pr-reviewers-and-status-checks
branch
from
July 16, 2026 12:39
2403b0a to
e2ca49b
Compare
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
This PR extends the
pull_request_readtool with two new methods that address gaps in the current PR toolset:get_reviewers— returns the list of pending reviewer requests for a pull request, including both individual users and team reviewers. Previously, thegetmethod only exposed requested user reviewers (as a flat list of logins) and team reviewers were entirely invisible in the MCP server. This uses thePullRequests.ListReviewersREST endpoint.get_status_checks— returns a unified view of all status checks for the PR's head commit by combining:plan/policy_check, external CI tools) viaRepositories.GetCombinedStatusChecks.ListCheckRunsForRefThe response includes a top-level
combined_stateand atotal_countacross both sources. Previously these required two separate calls (get_statusandget_check_runs) with no unified view.New types (
minimal_types.go)MinimalReviewerUserMinimalReviewerTeamMinimalPRReviewersget_reviewersMinimalCommitStatusMinimalStatusChecksTest plan
get_reviewersreturns correct users and teams for a PR with review requestsget_reviewersreturns empty arrays for a PR with no pending reviewersget_status_checksreturns both legacy statuses and check runs for a PRget_status_checkscombined_statereflects the overall GitHub statusget,get_reviews,get_check_runs, etc.) unaffectedgo test ./pkg/github/...🤖 Generated with Claude Code