| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
The list_issues GraphQL fragment never selected assignees, so the tool could not report who an issue was assigned to. Its nearest field, user, is the issue author, which callers conflate with the assignee. Answering "is anything unassigned?" therefore cost one list_issues call plus one issue_read per candidate, and a truncated sweep invites a fabricated answer drawn from the author instead. Add an assignees selection to IssueFragment, flatten it to logins in fragmentToMinimalIssue, and add "assignees" to listIssuesItemFieldEnum so it is selectable through fields. GitHub caps issue assignees at 10, so first: 100 cannot truncate; it also matches the page size already used for assignees in copilot.go. Drop omitempty from MinimalIssue.Assignees and initialize the slice in both converters so an unassigned issue serializes as [] rather than an absent key, which is what lets a caller identify unassigned issues from a single response. This also affects issue_read, the other MinimalIssue consumer, which now reports "assignees": [] instead of omitting the key.
Verify issue_read returns assigned logins and a definitive empty array for unassigned issues. Exercise the same empty-array contract through list_issues field filtering. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
| Back | FazBrowse Home | New Git URL |
The list_issues GraphQL fragment never selected assignees, so the tool could not report who an issue was assigned to. Its nearest field, user, is the issue author, which callers conflate with the assignee. Answering "is anything unassigned?" therefore cost one list_issues call plus one issue_read per candidate, and a truncated sweep invites a fabricated answer drawn from the author instead.
Add an assignees selection to IssueFragment, flatten it to logins in fragmentToMinimalIssue, and add "assignees" to listIssuesItemFieldEnum so it is selectable through fields. GitHub caps issue assignees at 10, so first: 100 cannot truncate; it also matches the page size already used for assignees in copilot.go.
Drop omitempty from MinimalIssue.Assignees and initialize the slice in both converters so an unassigned issue serializes as [] rather than an absent key, which is what lets a caller identify unassigned issues from a single response. This also affects issue_read, the other MinimalIssue consumer, which now reports "assignees": [] instead of omitting the key.
Summary
Adds assignees to list_issues, so the tool can report who each issue is assigned to. Previously the GraphQL fragment behind list_issues never selected assignees, and the field was absent from the tool's fields enum.
Why
list_issues had no way to return assignment data. Its fields enum offered number, title, body, state, user, labels, comments, created_at, updated_at, field_values — and user is the issue author, which callers conflate with the assignee.
This was an asymmetry between the two conversion paths rather than a deliberate omission. Both produce a MinimalIssue: the REST path (convertToMinimalIssue, backing issue_read) populated Assignees; the GraphQL path (fragmentToMinimalIssue, backing list_issues) never touched it. The enum was correct as documented — it lists only what the fragment actually populates — so the gap was upstream, in the query.
The cost was concrete: answering "is anything unassigned?" required one list_issues call plus one issue_read per candidate. On a 29-issue repository that is a 29-request sweep for a single question, and a sweep that gets truncated invites an answer fabricated from the user field instead.
Fixes #
What changed
MCP impact
list_issues accepts a new "assignees" value in fields and returns it per issue. Because issue_read shares MinimalIssue, it is also affected: an unassigned issue now reports "assignees": [] rather than omitting the key. No field was removed or renamed.
Prompts tested (tool changes only)
Verified through the tool handler in unit tests (assigned, unassigned, fields-selected, and fields-omitted cases), and the new GraphQL selection was run against the live API. githubv4mock will happily match a query GitHub would reject, so mocks alone don't prove the selection is valid. A 100-issue sample returned 21 issues with assignees, max 2 each.
Security / limits
No new data class or scope: assignee logins are already returned by issue_read, search_issues, and list_pull_requests, and assignees requires no permission beyond what listing issues already needs. Response growth is a short array of logins per issue, opt-out via fields. GitHub caps issue assignees at 10, so assignees(first: 100) cannot truncate; that page size matches the existing assignees(first: 100) selections in copilot.go.
Tool renaming
Lint & tests
Docs