Send update_issue_suggestions feature flag for set_issue_fields mutation#2638
Open
boazreicher wants to merge 2 commits into
Open
Send update_issue_suggestions feature flag for set_issue_fields mutation#2638boazreicher wants to merge 2 commits into
boazreicher wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR ensures the set_issue_fields granular tool can use the rationale and suggest inputs by opting into GitHub’s update_issue_suggestions GraphQL feature flag on the setIssueFieldValue mutation request (via the GraphQL-Features header), aligning the MCP server’s outbound GraphQL behavior with the API’s feature-gated schema.
Changes:
- Wrap the
setIssueFieldValuemutation call inGranularSetIssueFieldswith a context that enablesupdate_issue_suggestions. - Add a transport-chain test that asserts the outbound mutation request includes
GraphQL-Features: update_issue_suggestions.
Show a summary per file
| File | Description |
|---|---|
| pkg/github/issues_granular.go | Sets a GraphQL feature-flagged context for the setIssueFieldValue mutation so rationale/suggest inputs are accepted. |
| pkg/github/granular_tools_test.go | Adds a production-like transport-chain test to verify the GraphQL-Features header is emitted on the mutation request. |
Copilot's findings
- Files reviewed: 2/2 changed files
- Comments generated: 0
|
boazreicher/add-suggestions-and-rationale-to-issue-fields |
The GitHub GraphQL API does not yet accept the per-field confidence input on setIssueFieldValue mutations. Hide it from the user-facing schema and drop it from the mutation payload unless the new update_issue_confidence feature flag is enabled so users do not try to use it before the API supports it.
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
Gate the
set_issue_fieldsGraphQL mutation behind theupdate_issue_suggestionsfeature flag so therationaleandsuggestinput fields are accepted by the API.Why
The
rationaleandsuggestinput fields onIssueFieldCreateOrUpdateInputare only available when theupdate_issue_suggestionsGraphQL feature flag is enabled. Without it, mutations using those inputs are rejected.What changed
pkg/github/issues_granular.go: Wrap thesetIssueFieldValuemutation context withghcontext.WithGraphQLFeatures("update_issue_suggestions")so the existingGraphQLFeaturesTransportemits the appropriateGraphQL-Featuresheader.pkg/github/granular_tools_test.go: Add a test that builds the production transport chain and asserts the mutation request carries theupdate_issue_suggestionsfeature flag header.MCP impact
The tool schema is unchanged; only the outbound GraphQL request headers are affected.
Prompts tested (tool changes only)
Security / limits
Tool renaming
Lint & tests
./script/lint./script/testDocs