Uh oh!
There was an error while loading. Please reload this page.
fix: add authorAssociation to IssueFragment (GraphQL path) - #2265
fix: add authorAssociation to IssueFragment (GraphQL path)#2265lanxevo3 wants to merge 1 commit into
Conversation
Adds missing authorAssociation field to IssueFragment GraphQL struct and populates it in fragmentToMinimalIssue(), fixing the missing author_association field in list_issues responses from the GraphQL path. The REST path already correctly sets this via convertToMinimalIssue(). Fixesgithub#2250.
lanxevo3
commented
Mar 30, 2026
Hey @github/mcp-team — checking in on this PR. It's been open since March 26 and is mergeable. Adds �uthorAssociation field to IssueFragment to fix the GraphQL codegen path. Any blockers or feedback? Happy to iterate. |
SamMorrowDrums
commented
Apr 10, 2026
Hi, I will try to look and get this in soon. It does make sense to provide the data. |
SamMorrowDrums
left a comment
There was a problem hiding this comment.
Thanks for tackling this @lanxevo3, and apologies for the slow response.
Unfortunately the change as written won't work at runtime — authorAssociation isn't a field on the Actor interface that author returns, it's a top-level field on the Issue node itself. I verified against the live GraphQL API:
$ gh api graphql -f query='{ repository(owner:"github", name:"github-mcp-server") { issues(first:1) { nodes { author { login association } } } } }'
{"errors":[{"message":"Field 'association' doesn't exist on type 'Actor'", ...}]}
vs. the correct shape:
$ gh api graphql -f query='{ repository(owner:"github", name:"github-mcp-server") { issues(first:1) { nodes { authorAssociation author { login } } } } }'
{"data":{"repository":{"issues":{"nodes":[{"authorAssociation":"MEMBER","author":{"login":"toby"}}]}}}}
The unit tests pass because they mock the GraphQL response shape rather than validating against the real schema, so this slipped through.
What needs to change
In pkg/github/issues.go, move the field out of the Author struct and onto IssueFragment itself:
typeIssueFragmentstruct {
Number githubv4.IntTitle githubv4.StringBody githubv4.StringState githubv4.StringDatabaseIDint64AuthorAssociation githubv4.StringAuthorstruct {
Login githubv4.String
}
// ...
}In pkg/github/minimal_types.go, read the new field directly:
AuthorAssociation: string(fragment.AuthorAssociation),One more (optional) ask
Issue #2250 also calls out that MinimalPullRequest is missing author_association on the REST path — it'd be great to address that here too while you're at it, but happy to take it as a follow-up if you'd rather keep this PR focused.
Let me know if you'd like me to push the fix on top, otherwise feel free to update and I'll re-review. Thanks!
advancedresearcharray
commented
Jun 6, 2026
Addressed the review feedback from @SamMorrowDrums — Changes
Ready branchRebased on current Compare: main...advancedresearcharray:fix/author-association-issue-fragment-2265
@lanxevo3 — if you can cherry-pick or merge that branch onto |
advancedresearcharray
commented
Jun 6, 2026
Updated the fix branch per @SamMorrowDrums's review feedback — Verification: Delivery options (no write access to
@SamMorrowDrums — since maintainer edits are enabled on this PR, pushing the fix branch onto |
advancedresearcharray
commented
Jun 6, 2026
Addressed @SamMorrowDrums's review feedback — Changes (4 files)
Verification
DeliveryReady branch rebased on this PR's head: https://github.com/advancedresearcharray/github-mcp-server/tree/fix/pr-2265-review-feedback Mergeable PR to update this head branch: lanxevo3#2 @SamMorrowDrums — maintainer edits are enabled; pushing the fix branch onto |
Summary
Adds the missing \�uthorAssociation\ field to the \IssueFragment\ GraphQL struct and populates it in \ragmentToMinimalIssue(), fixing the missing \�uthor_association\ field in \list_issues\ responses when using the GraphQL path.
Changes
Note
The REST path (\convertToMinimalIssue()) already correctly sets \AuthorAssociation\ from \issue.GetAuthorAssociation(). The GraphQL path was missing this field.
Fixes#2250