Repository navigation
Conversation
Issue fields are GA and the API ignores unknown GraphQL-Features names, so sending issue_fields and repo_issue_fields no longer changes anything. Remove them from every query, drop the stale LegacyIssueWrite comment, and pin the stdio GraphQL-Features wiring with a neutral feature name. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 48ff87e1-24bb-49f1-887f-9f2576ab0c2d
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The change affects multiple GraphQL issue/project paths, GHES fallback behavior, and shared header transport, while compatibility across supported schemas and proxy behavior cannot be established from automated review alone.
No open issues 🎉
What changed in this PR
This PR removes obsolete issue_fields and repo_issue_fields GraphQL feature headers from issue and project-related queries while preserving active feature-header behavior. It also updates related tests and corrects outdated IssueWrite documentation.
Changes:
- Removes obsolete feature-header wrapping from issue-field, issue-list, issue-update, and project-field queries.
- Updates tests to verify obsolete headers are absent while retaining coverage for active feature headers.
- Replaces stale
IssueWritedocumentation referencing removed symbols.
| File | Description |
|---|---|
| pkg/github/projects_resolver.go | Removes obsolete feature-header context wrapping from project issue-field resolution. |
| pkg/github/projects_resolver_test.go | Verifies project issue-field resolution sends no obsolete feature header. |
| pkg/github/issues.go | Removes obsolete headers from issue-related GraphQL queries and updates the IssueWrite documentation. |
| pkg/github/issues_test.go | Verifies list_issues requests send no GraphQL-Features header. |
| pkg/github/issue_fields.go | Removes obsolete feature-header wrapping from issue-field lookup queries. |
| internal/ghmcp/server_test.go | Moves active feature-header transport coverage to a focused GraphQL client construction test. |
Review effort: Lite (auto)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR removes the
issue_fieldsandrepo_issue_fieldsnames from everyGraphQL-Featuresheader we send. The API already ignores both, so the only difference on the wire is that these requests no longer carry the header.Why
Fixes: N/A
Issue fields are GA, and nothing in the GraphQL schema is gated on
issue_fieldsorrepo_issue_fieldsanymore. The API ignoresGraphQL-Featuresnames that don't gate anything, so sending these two is a no-op. Leaving them in makes it look like these queries still depend on a preview opt-in when they don't.This is groundwork for supporting issue types and issue fields on user-owned repositories, which I'll stack on top of this branch. I kept this one to the header cleanup so it's easy to review on its own.
What changed
fetchIssueFields,resolveIssueRequestFieldValues,fetchExistingIssueFieldValues, thelist_issuesquery, andresolveIssueFieldForUpdatenow query with the caller'sctxinstead of wrapping it inWithGraphQLFeatures. Theupdate_issue_suggestionsandissues_copilot_assignment_api_supportfeatures and theWithGraphQLFeatureshelper are untouched.IssueWritedoc comment pointed atLegacyIssueWriteandFeatureFlagIssueFields, which no longer exist. I replaced it with the same one-liner Add multi_select issue field support #2659 uses so the two don't conflict.list_issuesand project resolver tests now assert that noGraphQL-Featuresheader goes out.TestStdioGraphQLUserAgentwas the only test proving the stdio client wires up feature headers, and it relied onlist_issuessending them, so I moved that check toTestCreateGitHubClientsGraphQLUserAgentwith a neutraltest_featurename.The
list_issuesretry without field values stays as is. It runs when the host schema has no issue field types at all (for example an older GHES), which the header never changed, so dropping the header doesn't change when it fires.#2659 adds one more
issue_fields, repo_issue_fieldscall infetchIssueFieldValuesByNodeID, which can go when it rebases.MCP impact
No tool schema changes.
UPDATE_TOOLSNAPS=true go test ./...andscript/generate-docsboth leave the tree clean.Prompts tested (tool changes only)
Security / limits
Requests send one fewer header. Auth and permissions don't change.
Tool renaming
deprecated_tool_aliases.goNote: if you're renaming tools, you must add the tool aliases. For more information on how to do so, please refer to the official docs.
Lint & tests
Linted locally with
./script/lintTested locally with
./script/testgo build ./...passes.script/testandgo test ./...pass.script/lintreports 0 issues.UPDATE_TOOLSNAPS=true go test ./...passes with no snapshot diff.script/generate-docsproduces no README or docs diff.I checked that the new assertions catch regressions. Putting a feature header back on the
list_issuesquery fails thedoes not send a GraphQL-Features headertest, and turning off header injection in the transports failsTestCreateGitHubClientsGraphQLUserAgent.Docs