Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support for retrieving per-job CI/CD check run status for a pull request by introducing a new get_check_runs method on the existing pull_request_read tool (fixes #1942).
Changes:
- Extended
pull_request_readtool schema/enum withget_check_runsand documented it in README/toolsnap. - Implemented
GetPullRequestCheckRunsusing the GitHub Checks API and a minimal response shape to reduce payload size. - Added unit tests and a mock endpoint constant for the check-runs API route.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pkg/github/pullrequests.go | Adds the new get_check_runs method and implements the check-runs retrieval via GitHub Checks API. |
| pkg/github/minimal_types.go | Introduces minimal types and conversion helper for check run output shaping. |
| pkg/github/pullrequests_test.go | Adds unit tests covering success and failure paths for get_check_runs. |
| pkg/github/helper_test.go | Adds mock route constant for GET /repos/{owner}/{repo}/commits/{ref}/check-runs. |
| pkg/github/toolsnaps/pull_request_read.snap | Updates tool schema snapshot to include the new method enum value and description. |
| README.md | Updates tool documentation to include the new get_check_runs method. |
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
Add
get_check_runsmethod to thepull_request_readtool to fetch CI/CD check run status for a pull request's head commit.Why
Fixes #1942
AI tools cannot easily determine which CI/CD checks are failing on a pull request. The existing
get_statusmethod returns combined commit status but not individual check runs (GitHub Actions jobs, third-party checks).What changed
get_check_runsas option 8 inpull_request_readmethod enumGetPullRequestCheckRunsfunction using GitHub Checks APIMinimalCheckRunandMinimalCheckRunsResulttypes to reduce response sizeMCP impact
get_check_runsmethod value to the existingpull_request_readtool's method enum.Prompts tested (tool changes only)
Security / limits
scopes.Reposcope, same as other PR read methods.Tool renaming
deprecated_tool_aliases.goLint & tests
./script/lint./script/testgo test -run Test_GetPullRequestCheckRuns ./pkg/github/...- all tests pass.Docs