Skip to content

Expose review decision and CI rollup in PR lists - #3335

Open
dawNotPoi wants to merge 1 commit into
github:mainfrom
dawNotPoi:fix/pr-list-review-ci-3287
Open

dawNotPoi wants to merge 1 commit into
github:mainfrom
dawNotPoi:fix/pr-list-review-ci-3287

Conversation

@dawNotPoi

Copy link
Copy Markdown

Summary

Add optional review_decision and status_check_rollup fields to list_pull_requests and search_pull_requests. Agents can now classify a page of PRs by overall review decision and aggregate CI state in one tool call.

Why

Fixes #3287. Today this summary requires follow-up calls for each PR, which grows both latency and context size.

What changed

  • When either field is explicitly selected, enrich the current REST page with one batched GraphQL nodes query. Preserve REST pagination, ordering, and cross-repository search results.
  • Return nullable review decisions and the latest PR commit's status/check rollup state. Calls without these fields keep their existing response and request path; enrichment failures return an explicit error.
  • Add tests for mixed decisions and CI states, missing rollups and nodes, pagination, cross-repository search, one batch request, opt-in behavior, and failure paths. Update tool snapshots and generated README descriptions.

MCP impact

  • No tool or API changes
  • Tool schema or behavior changed — both PR list tools expose two optional fields.
  • New tool added

Prompts tested (tool changes only)

  • "List open PRs in this repository with their review decision and aggregate CI status."
  • "Search PRs across repositories and show each PR's number, review decision, and CI state."

The tool handler tests exercise these field selections with REST and GraphQL responses; a live cross-repository GraphQL query confirmed the latest-commit rollup shape.

Security / limits

  • No security or limits impact
  • Auth / permissions considered — the GraphQL query uses the existing authenticated client and only node IDs from the REST result.
  • Data exposure, filtering, or token/size limits considered — enrichment stays within the requested page, leaves the existing IFC labeling path intact, and only emits selected fields.

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
  • Also passed UPDATE_TOOLSNAPS=true go test ./..., go test -v ./..., and golangci-lint run.

Docs

  • Not needed
  • Updated (README / docs / examples)

@dawNotPoi
dawNotPoi requested a review from a team as a code owner September 25, 2026 12:56
@dawNotPoi

Copy link
Copy Markdown
Author

@SamMorrowDrums This PR is ready for review. It adds nullable review-decision and latest-commit CI rollup fields to both PR list tools, using one batched GraphQL request for the requested page while preserving the existing REST order and pagination. The full test suite, race tests, lint, snapshots, and docs generation passed locally. Could you take a look when convenient?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

list_pull_requests / search_pull_requests: expose review decision + combined CI status as optional fields

2 participants