-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Open
Description
Summary
The author_association field is missing from several MCP response types, which prevents downstream consumers from determining author permissions (e.g., OWNER, MEMBER, COLLABORATOR, CONTRIBUTOR, NONE).
Affected Endpoints
1. list_issues (GraphQL path)
IssueFragmentstruct does not requestauthorAssociationin the GraphQL queryfragmentToMinimalIssue()does not populateAuthorAssociationinMinimalIssue- Note: The REST path in
convertToMinimalIssue()correctly setsAuthorAssociation: issue.GetAuthorAssociation()
2. list_pull_requests and pull_request_read (REST path)
MinimalPullRequeststruct is missing theauthor_associationfield entirelyconvertToMinimalPullRequest()does not set it- The raw
*github.PullRequestfrom the go-github library hasAuthorAssociationavailable viapr.GetAuthorAssociation()
Already Working
issue_read(single issue GET) — uses RESTconvertToMinimalIssue()which includesauthor_association✅get_review_comments—MinimalPullRequestReviewincludesauthor_association✅
Impact
Consumers that rely on author_association to determine author trust level (OWNER, MEMBER, COLLABORATOR, CONTRIBUTOR, NONE) cannot make correct decisions when this field is missing from list_issues and pull request responses.
For example, a repo admin's issues are incorrectly treated as untrusted because their author_association of "MEMBER" is not present in the response.
Suggested Fix
For list_issues (GraphQL):
- Add
AuthorAssociation githubv4.StringtoIssueFragmentstruct inissues.go - Set
AuthorAssociation: string(fragment.AuthorAssociation)infragmentToMinimalIssue()inminimal_types.go
For pull requests (REST):
- Add
AuthorAssociation string \x60json:"author_association,omitempty"\x60toMinimalPullRequeststruct inminimal_types.go - Set
AuthorAssociation: pr.GetAuthorAssociation()inconvertToMinimalPullRequest()inminimal_types.go
References
pkg/github/issues.go—IssueFragmentstructpkg/github/minimal_types.go—MinimalIssue,MinimalPullRequest,fragmentToMinimalIssue(),convertToMinimalPullRequest()
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Give feedbackNo fields configured for issues without a type.