Skip to content

Drop obsolete issue_fields GraphQL feature headers - #3831

Open
dewski wants to merge 1 commit into
mainfrom
dewski/drop-issue-fields-graphql-features
Open

dewski wants to merge 1 commit into
mainfrom
dewski/drop-issue-fields-graphql-features

Conversation

@dewski

@dewski dewski commented Nov 12, 2026 •

Copy link
Copy Markdown

Summary

This PR removes the issue_fields and repo_issue_fields names from every GraphQL-Features header 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_fields or repo_issue_fields anymore. The API ignores GraphQL-Features names 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, the list_issues query, and resolveIssueFieldForUpdate now query with the caller's ctx instead of wrapping it in WithGraphQLFeatures. The update_issue_suggestions and issues_copilot_assignment_api_support features and the WithGraphQLFeatures helper are untouched.
  • The IssueWrite doc comment pointed at LegacyIssueWrite and FeatureFlagIssueFields, 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.
  • The list_issues and project resolver tests now assert that no GraphQL-Features header goes out. TestStdioGraphQLUserAgent was the only test proving the stdio client wires up feature headers, and it relied on list_issues sending them, so I moved that check to TestCreateGitHubClientsGraphQLUserAgent with a neutral test_feature name.

The list_issues retry 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_fields call in fetchIssueFieldValuesByNodeID, which can go when it rebases.

MCP impact

  • No tool or API changes
  • Tool schema or behavior changed
  • New tool added

No tool schema changes. UPDATE_TOOLSNAPS=true go test ./... and script/generate-docs both leave the tree clean.

Prompts tested (tool changes only)

  • N/A, no tool changes.

Security / limits

  • No security or limits impact
  • Auth / permissions considered
  • Data exposure, filtering, or token/size limits considered

Requests send one fewer header. Auth and permissions don't change.

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

Note: 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/lint

  • Tested locally with ./script/test

  • go build ./... passes.

  • script/test and go test ./... pass.

  • script/lint reports 0 issues.

  • UPDATE_TOOLSNAPS=true go test ./... passes with no snapshot diff.

  • script/generate-docs produces no README or docs diff.

  • I checked that the new assertions catch regressions. Putting a feature header back on the list_issues query fails the does not send a GraphQL-Features header test, and turning off header injection in the transports fails TestCreateGitHubClientsGraphQLUserAgent.

Docs

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

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 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 IssueWrite documentation 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)

@dewski
dewski marked this pull request as ready for review November 12, 2026 18:48
@dewski
dewski requested a review from a team as a code owner November 12, 2026 18:48
@dewski
dewski added this pull request to stack #3833 November 12, 2026 19:18
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.

2 participants