-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Description
Describe the feature or problem you'd like to solve
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). This makes it difficult to automate fixing failing CI.
Proposed solution
Add a get_check_runs method to the pull_request_read tool that fetches check runs for a PR's head commit via the GitHub Checks API. Returns a minimal response with essential fields only (id, name, status, conclusion, html_url, timestamps) to conserve context.
Example prompts or workflows (for tools/toolsets only)
- "Which CI checks are failing on my PR?" → Returns list of check runs with pass/fail status
- "Fix the failing tests on PR Issue: Fix incorrect VS Code installation URL (both buttons point to Insiders) #123" → Get check runs → Identify failed job → Fetch logs → Apply fix
- "Show me the status of all checks on this pull request" → Returns check run summary
- "Is my PR ready to merge?" → Check if all check runs have completed successfully
- "Why is the build failing?" → Get check runs → Find failed check → Use html_url to investigate
Additional context
The response uses a minimal format to reduce token usage:
{
"total_count": 2,
"check_runs": [
{ "id": 123, "name": "build", "status": "completed", "conclusion": "success", "html_url": "..." },
{ "id": 124, "name": "lint", "status": "completed", "conclusion": "failure", "html_url": "..." }
]
}