Skip to content

## Pull request overview #2420

@leuasseurfarrelds247-arch

Description

Pull request overview

This PR extends the issues tool surface to support reading and writing GitHub Issues 2.0 custom field values, aligning issue_read/issue_write behavior with the newer REST/GraphQL capabilities introduced alongside the go-github upgrade.

Changes:

  • Added issue_fields input to issue_write, including name-based resolution of field IDs and (for single-select) option validation.
  • Expanded issue_read output handling to include REST issue_field_values, and added best-effort GraphQL enrichment to normalize to field_values where possible.
  • Updated minimal/DTO types and unit tests to cover issue field value parsing and write request shaping.
Show a summary per file
File Description
README.md Documents the new issue_fields input for issue_write.
pkg/github/minimal_types.go Adds REST-backed minimal issue field value types and separates REST issue_field_values from GraphQL-normalized field_values.
pkg/github/issues.go Implements parsing + GraphQL metadata resolution for issue_fields, wires field values into create/update, and adjusts search/get enrichment paths.
pkg/github/issues_test.go Adds/updates tests for get/write behavior involving issue field values.
pkg/github/issue_fields.go Fetches/stores GraphQL fullDatabaseId for issue fields and adds parsing helper.
pkg/github/issue_fields_test.go Updates expectations to include fullDatabaseId/DatabaseID.
pkg/github/toolsnaps/issue_write.snap Updates tool schema snapshot to include issue_fields.
docs/insiders-features.md Reflects the issue_fields parameter in generated docs.
docs/feature-flags.md Reflects the issue_fields parameter in generated docs.

Copilot's findings

Comments suppressed due to low confidence (1)

pkg/github/issues.go:1599

  • searchIssuesHandler now always performs GraphQL field_values enrichment whenever there are results, and returns an error if GraphQL is unavailable or the query fails. This looks like a regression of the documented behavior of FeatureFlagIssueFields (which is meant to gate search_issues field_values enrichment); please restore the feature-flag check so search_issues works without GraphQL issue fields features enabled.
	var fieldValuesByID map[string][]MinimalFieldValue
	if len(result.Issues) > 0 {
		gqlClient, err := deps.GetGQLClient(ctx)
		if err != nil {
			return utils.NewToolResultErrorFromErr(errorPrefix+": failed to get GitHub GraphQL client", err), nil
		}
		fieldValuesByID, err = fetchIssueFieldValuesByNodeID(ctx, gqlClient, result.Issues)
		if err != nil {
			return ghErrors.NewGitHubGraphQLErrorResponse(ctx, errorPrefix+": failed to fetch issue field values", err), nil
		}
	}
  • Files reviewed: 9/9 changed files
  • Comments generated: 2

Originally posted by @copilot-pull-request-reviewer in github/github-mcp-server#2551 (review)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions