Skip to content

Get check runs#1953

Merged
tommaso-moro merged 13 commits into
github:mainfrom
kaitlin-duolingo:get_check_runs
Feb 25, 2026
Merged

Get check runs#1953
tommaso-moro merged 13 commits into
github:mainfrom
kaitlin-duolingo:get_check_runs

Conversation

@kaitlin-duolingo

Copy link
Copy Markdown
Contributor

Summary

Add get_check_runs method to the pull_request_read tool 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_status method returns combined commit status but not individual check runs (GitHub Actions jobs, third-party checks).

What changed

  • Added get_check_runs as option 8 in pull_request_read method enum
  • Added GetPullRequestCheckRuns function using GitHub Checks API
  • Added MinimalCheckRun and MinimalCheckRunsResult types to reduce response size
  • Added test endpoint constant and unit tests

MCP impact

  • No tool or API changes
  • Tool schema or behavior changed
    • Added new get_check_runs method value to the existing pull_request_read tool's method enum.
  • New tool added

Prompts tested (tool changes only)

  • "Which CI checks are failing on my PR?"
  • "Show me the status of all checks on this pull request"
  • "Is my PR ready to merge?"

Security / limits

  • No security or limits impact
  • Auth / permissions considered
    • Uses existing scopes.Repo scope, same as other PR read methods.
  • Data exposure, filtering, or token/size limits considered
    • Returns minimal check run fields only (excludes verbose Output, CheckSuite, App, PullRequests objects) to conserve context tokens.

Tool renaming

  • I am renaming tools as part of this PR (e.g. a part of a consolidation effort)
    • I have added the new tool aliases in deprecated_tool_aliases.go
  • I am not renaming tools as part of this PR

Lint & tests

  • Linted locally with ./script/lint
  • Tested locally with ./script/test
    • Ran go test -run Test_GetPullRequestCheckRuns ./pkg/github/... - all tests pass.

Docs

  • Updated (README / docs / examples)
@kaitlin-duolingo kaitlin-duolingo requested a review from a team as a code owner February 3, 2026 22:20
Copilot AI review requested due to automatic review settings February 3, 2026 22:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_read tool schema/enum with get_check_runs and documented it in README/toolsnap.
  • Implemented GetPullRequestCheckRuns using 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.
Comment thread pkg/github/pullrequests.go Outdated
tommaso-moro
tommaso-moro previously approved these changes Feb 24, 2026

@tommaso-moro tommaso-moro left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great addition, thank you so much for your work on this! I have tweaked the tool description slightly and resolved some conflicts with main. 🚀

@tommaso-moro tommaso-moro self-assigned this Feb 24, 2026

@omgitsads omgitsads left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@tommaso-moro tommaso-moro merged commit 91b35e0 into github:main Feb 25, 2026
11 checks passed
@jevon-bjak

Copy link
Copy Markdown

hi, may i know when is this addition planning to be released?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

5 participants