Add html_url to list_issues results#2586
Open
sawyer0x110 wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR populates html_url for issues returned via GitHub GraphQL by selecting the url field in issue fragments and wiring it into the minimal issue representation.
Changes:
- Add
urltoIssueFragmentandLegacyIssueFragmentGraphQL selections. - Map GraphQL
urlintoMinimalIssue.HTMLURL. - Update issue listing tests and expected GraphQL query strings to include
url.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| pkg/github/minimal_types.go | Maps fragment url into MinimalIssue.HTMLURL. |
| pkg/github/issues.go | Extends GraphQL fragments to select the url field. |
| pkg/github/issues_test.go | Updates fixtures, query expectations, and assertions for populated HTMLURL. |
d00a650 to
2ca9960
Compare
2ca9960 to
e6d1315
Compare
Collaborator
|
@sawyer0x110 I have not encountered agents that can't construct the URLs from the ID consistently. Can you explain more? They are very token heavy for just adding a standard repo owner url around the issue number. |
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_issuespreviously returnedhtml_urlwhen it used the REST API response shape. After the tool moved to GraphQL, the minimal issue fragment no longer selected the issue web URL, sohtml_urlwas omitted fromlist_issuesresults.This adds the GraphQL issue
urlfield back to thelist_issuesresponse ashtml_url, aligning the issue list output withlist_pull_requests, which already includeshtml_urlfor each returned item.Including the web URL gives chat clients a stable, navigable link for each issue in the result.
Testing
go test ./pkg/github -run 'Test_ListIssues|Test_ListIssues_FieldFilters|Test_ListIssues_IFC_InsidersMode|Test_LegacyListIssues'