pull_request_read get_files always returns full patches
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 68/100
Rechercherichtung
Beginne am pull_request_read-Einstiegspunkt für die Methode get_files und untersuche convertToMinimalPRFiles, das derzeit MinimalPRFile.Patch bedingungslos befüllt. Vergleiche die vorhandenen Feldauswahlmechanismen listPullRequestsItemFieldEnum und listCommitsItemFieldEnum und überprüfe anschließend, dass Aufrufer Dateimetadaten ohne Patches anfordern können und das Standardverhalten weiterhin eindeutig ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Describe the bug
pull_request_read with method: get_files always includes the full patch for every file, and offers no way to ask for filenames only. A 21-file pull request returned roughly 370 KB when only the paths were needed.
In the source, convertToMinimalPRFiles populates MinimalPRFile.Patch unconditionally, and get_files has no field-selection parameter. Several other tools do have one, for example listPullRequestsItemFieldEnum and listCommitsItemFieldEnum, so the mechanism already exists elsewhere in the codebase.
Affected version
Unknown. Observed through a hosted GitHub MCP integration on 2026-09-06, where the server version is not exposed to me. The code references above are from the repository's default branch on that date and may not match the build that was serving the request.
Steps to reproduce the behavior
- Call
pull_request_readwithmethod: get_filesfor a pull request touching a reasonable number of files. - Observe that every entry carries its full
patch, with no option to omit it.
Expected vs actual behavior
Expected: a way to request file metadata without patches, for example a fields parameter matching the pattern used by the list tools.
Actual: patches are always included, so a caller that only needs the list of changed paths pays the full diff in context.
Possibly related to #2122, which is closed but describes the same class of oversized pull_request_read payloads.
Logs
None captured beyond the returned payload size.
- Vorherrschende Sprache
- Go
- Sterne
- 33.1k
- Forks
- 5k
- Ø Merge
- 2 T. 1 Std.
- Gemergte PRs (30 T.)
- 25
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus github/github-mcp-server
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
github/github-mcp-server#3235 ·
-
enhancement
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
github/github-mcp-server#3042 · 2 Kommentare ·
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
github/github-mcp-server#3032 · 1 Reaktion ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
github/github-mcp-server#2803 · 1 Kommentar ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
github/github-mcp-server#2740 ·
Alle Issues in github/github-mcp-server
Ähnliche Issues
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 60/100
github/gh-aw-mcpg#13748 ·
-
agentic-workflows
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
-
needs-triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
googleapis/librarian#7670 · 2 Kommentare ·