Skip to content

Send update_issue_suggestions feature flag for set_issue_fields mutation#2638

Open
boazreicher wants to merge 2 commits into
mainfrom
boazreicher/add-suggestions-and-rationale-to-issue-fields
Open

Send update_issue_suggestions feature flag for set_issue_fields mutation#2638
boazreicher wants to merge 2 commits into
mainfrom
boazreicher/add-suggestions-and-rationale-to-issue-fields

Conversation

@boazreicher

Copy link
Copy Markdown
Contributor

Summary

Gate the set_issue_fields GraphQL mutation behind the update_issue_suggestions feature flag so the rationale and suggest input fields are accepted by the API.

Why

The rationale and suggest input fields on IssueFieldCreateOrUpdateInput are only available when the update_issue_suggestions GraphQL feature flag is enabled. Without it, mutations using those inputs are rejected.

What changed

  • pkg/github/issues_granular.go: Wrap the setIssueFieldValue mutation context with ghcontext.WithGraphQLFeatures("update_issue_suggestions") so the existing GraphQLFeaturesTransport emits the appropriate GraphQL-Features header.
  • pkg/github/granular_tools_test.go: Add a test that builds the production transport chain and asserts the mutation request carries the update_issue_suggestions feature flag header.

MCP impact

  • No tool or API changes

The tool schema is unchanged; only the outbound GraphQL request headers are affected.

Prompts tested (tool changes only)

  • n/a

Security / limits

  • No security or limits impact

Tool renaming

  • I am not renaming tools as part of this PR

Lint & tests

  • Linted locally with ./script/lint
  • Tested locally with ./script/test

Docs

  • Not needed

Copilot AI review requested due to automatic review settings June 8, 2026 05:25
@boazreicher boazreicher requested a review from a team as a code owner June 8, 2026 05:25

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.

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 setIssueFieldValue mutation call in GranularSetIssueFields with a context that enables update_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

@angeydono-lang

Copy link
Copy Markdown

boazreicher/add-suggestions-and-rationale-to-issue-fields

@angeydono-lang

Copy link
Copy Markdown

#2638 (comment)

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.
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.

3 participants