Repository navigation
list_issues: accept and return html_url in fields - #3964
Open
sarankumar1325 wants to merge 1 commit into
Open
sarankumar1325 wants to merge 1 commit into
sarankumar1325 wants to merge 1 commit into
Conversation
search_issues accepts html_url in fields, but list_issues rejected it, because the list_issues GraphQL fragment never fetched the issue URL. Fetch url in the list_issues fragments, map it to html_url on MinimalIssue, and add html_url to the list_issues fields enum, so the two tools can share a fields list. Fixes github#3960 Signed-off-by: sarankumar1325 <120080287+sarankumar1325@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Modern-protocol issue-list responses still omit html_url because the typed output lacks the field and mapping, leaving requested URLs missing from results.
1 open issue
What changed in this PR
This PR addresses the html_url mismatch in #3960 by adding it to list_issues, allowing callers to share that field selection with search_issues. The broader shared-schema proposal remains out of scope.
Changes:
- Fetch issue URLs in both GraphQL fragments and map them to
MinimalIssue.HTMLURL. - Add
html_urlto the selectable fields and update the schema snapshot. - Update query expectations and add a direct-handler test for URL field selection.
| File | Description |
|---|---|
pkg/github/minimal_types.go |
Allows html_url selection and maps GraphQL URLs into issue results. |
pkg/github/issues.go |
Fetches URLs in both issue fragments. |
pkg/github/issues_test.go |
Updates expected GraphQL queries to include URLs. |
pkg/github/fields_filtering_test.go |
Adds URL fixture data and field-selection coverage. |
pkg/github/__toolsnaps__/list_issues.snap |
Records the new html_url input field option. |
Review effort: Balanced (adaptive)
| var listIssuesItemFieldEnum = []any{ | ||
| "number", "title", "body", "state", "user", "labels", "assignees", | ||
| "comments", "created_at", "updated_at", "field_values", | ||
| "comments", "created_at", "updated_at", "html_url", "field_values", |
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
list_issuesnow acceptshtml_urlinfieldsand returns it, assearch_issuesalready does.Why
search_issues(fields: [..., "html_url"])works, butlist_issueswith the samefieldsfails validation, so callers can't share one projection between the two tools.html_urlwas left out of thelist_issuesenum because the list_issues GraphQL fragment never fetched the issue URL.Fixes #3960
What changed
urlin both list_issues GraphQL fragments (IssueFragmentandissueFragmentWithoutFieldValues), and map it toMinimalIssue.HTMLURL(html_url,omitempty).html_urltolistIssuesItemFieldEnum, and update the comment that said it's never emitted.__toolsnaps__/list_issues.snap, and updated the expected GraphQL query strings in the existing tests.Test_ListIssues_HTMLURLField:fields: ["number", "html_url"]returns exactly those two fields with the issue's URL.This only covers the
html_urlmismatch from the issue. It doesn't attempt the broader shared-schema proposal.MCP impact
list_issuesgains thehtml_urlfield option, and unfiltered results now includehtml_url.Prompts tested (tool changes only)
list_issueswithfields: ["number","html_url"].Security / limits
search_issuesandissue_read.Tool renaming
deprecated_tool_aliases.goLint & tests
golangci-lint run(0 issues)go test ./...Docs
script/generate-docsproduced no README changes.Skills
list_issuesfield options.