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
}
}
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_writebehavior with the newer REST/GraphQL capabilities introduced alongside the go-github upgrade.Changes:
issue_fieldsinput toissue_write, including name-based resolution of field IDs and (for single-select) option validation.issue_readoutput handling to include RESTissue_field_values, and added best-effort GraphQL enrichment to normalize tofield_valueswhere possible.Show a summary per file
issue_fieldsinput forissue_write.issue_field_valuesfrom GraphQL-normalizedfield_values.issue_fields, wires field values into create/update, and adjusts search/get enrichment paths.fullDatabaseIdfor issue fields and adds parsing helper.fullDatabaseId/DatabaseID.issue_fields.issue_fieldsparameter in generated docs.issue_fieldsparameter in generated docs.Copilot's findings
Comments suppressed due to low confidence (1)
pkg/github/issues.go:1599
searchIssuesHandlernow 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 ofFeatureFlagIssueFields(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.Originally posted by @copilot-pull-request-reviewer in github/github-mcp-server#2551 (review)