| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Answering "is there a PR that closes this issue?" previously required listing pull requests and grepping their bodies for closing keywords, which is expensive and unreliable. GraphQL already exposes Issue.closedByPullRequestsReferences. Add it to the existing issue_read `get` enrichment query so the answer comes back in the same round-trip as the hierarchy signals, as a compact `closed_by_pull_requests` list. An enriched issue with no closing pull requests serializes an explicit empty list so an agent can stop looking. Lockdown mode filters references whose author cannot be verified as safe content, mirroring the existing parent reference handling. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: a0b58914-0d94-47a9-8229-c0ef7e32e69f
This enrichment runs on every issue_read get, so embedding up to 25 references costs more than the common case is worth. Embed at most 5, keeping orderByState so open pull requests are the ones that survive. Select totalCount alongside the nodes and return the summary as an object of total_count plus references, so the rare issue with more than five linked pull requests cannot be read as a complete list. The common zero-to-two case stays compact and an empty result stays definitive. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: a0b58914-0d94-47a9-8229-c0ef7e32e69f
There was a problem hiding this comment.
Adds closing pull request summaries to issue_read get using existing GraphQL enrichment.
Changes:
| File | Description |
|---|---|
| README.md | Documents the new response field. |
| pkg/github/minimal_types.go | Defines compact closing PR response types. |
| pkg/github/issues.go | Queries, filters, and returns closing PRs. |
| pkg/github/issues_test.go | Covers results, truncation, sanitization, failures, and lockdown. |
| pkg/github/__toolsnaps__/issue_read.snap | Updates the tool schema snapshot. |
Sorry, something went wrong.
There was a problem hiding this comment.
Looks good to me 🚀
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary
issue_read with method=get now returns closed_by_pull_requests, a compact summary of the pull requests configured to close the issue, sourced from the GraphQL Issue.closedByPullRequestsReferences field.
Why
Answering "is there a PR that closes this issue?" previously meant listing up to 100 pull requests and grepping their bodies for closing keywords. That burns a large token budget and misses cross-repo and non-body links. GraphQL already models this relationship directly.
What changed
includeClosedPrs is required because it defaults to false and hides merged and closed PRs, which are exactly what answers "which PR closed this?". orderByState keeps open PRs ahead of the cap.
MCP impact
Prompts tested (tool changes only)
Drove the built server over stdio against the live API:
Security / limits
Tool renaming
Lint & tests
Table-driven coverage for populated results (including a cross-repo PR), empty results, truncation, title sanitization, lockdown filtering, and the enrichment-failure path.
Docs