actions / actions/toolkit

## Pull request overview

Open
#2,420 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
5.9k
Forks
1.8k
PR merge metrics
No merged PRs in 30d

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 https://github.com/github/github-mcp-server/pull/2551#pullrequestreview-4365741362

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with pkg/github/issues.go and pkg/github/issues_test.go; the overview describes issue field value handling and flags a possible regression in searchIssuesHandler. Check the feature-flag behavior and its tests first. Done means search enrichment respects the documented feature-flag behavior while the listed read/write cases remain covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
github, graphql, typescript
Domain
api, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.