Add support for issue fields values to issues.read and issues.write#2492
Open
iulia-b wants to merge 4 commits into
Open
Add support for issue fields values to issues.read and issues.write#2492iulia-b wants to merge 4 commits into
issues.read and issues.write#2492iulia-b wants to merge 4 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR wires the new IssueFieldValues support (added by the go-github v0.87 upgrade in PR #2452) into the issue_write and issue_read tools. On write, users can pass an issue_fields array specifying field names plus either a raw value or a single-select option name; the server resolves names → IDs via a GraphQL metadata query before calling the REST API. On read, custom field values are now surfaced in the trimmed MinimalIssue output.
Changes:
- Adds
issue_fieldsinput parameter toissue_write(create/update), including a GraphQL-based resolver that maps field/option names to database IDs. - Extends
MinimalIssuewith anissue_field_valuesarray (including single-select option details) populated from the REST response. - Updates README, toolsnap, and unit tests covering the new read/write behavior.
Show a summary per file
| File | Description |
|---|---|
| pkg/github/issues.go | Adds input parsing (optionalIssueWriteFields) and GraphQL-based name→ID resolution; threads IssueFieldValues through CreateIssue/UpdateIssue. |
| pkg/github/minimal_types.go | New MinimalIssueFieldValue/MinimalIssueFieldValueSingleSelectOption types and conversion logic. |
| pkg/github/issues_test.go | Adds tests for reading field values and writing with field-name resolution, plus validation error case. |
| pkg/github/toolsnaps/issue_write.snap | Snapshot updated for the new issue_fields schema entry. |
| README.md | Documents the new issue_fields parameter for issue_write. |
Copilot's findings
- Files reviewed: 5/5 changed files
- Comments generated: 2
Comment on lines
+60
to
+66
| type issueFieldMetadataQuery struct { | ||
| Repository struct { | ||
| IssueFields struct { | ||
| Nodes []issueFieldMetadataNode | ||
| } `graphql:"issueFields(first: 100)"` | ||
| } `graphql:"repository(owner: $owner, name: $repo)"` | ||
| } |
| issueFields := make([]IssueWriteFieldInput, 0, len(inputMaps)) | ||
| for _, itemMap := range inputMaps { | ||
| fieldName, err := RequiredParam[string](itemMap, "field_name") | ||
| if err != nil || strings.TrimSpace(fieldName) == "" { |
pachecocordovamoiseseduardo-byte
approved these changes
May 18, 2026
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
This PR is passing issue field values to the issue write & read tools, which now (after #2452) support this.
issues_writeis using that endpointWhy
What changed
MCP impact
Prompts tested (tool changes only)
Security / limits
Tool renaming
deprecated_tool_aliases.goNote: if you're renaming tools, you must add the tool aliases. For more information on how to do so, please refer to the official docs.
Lint & tests
./script/lint./script/testDocs