Missing author_association field in list_issues and pull request responses
还没有人认领这个 Issue。
评估
调研方向
首先阅读 pkg/github/issues.go 和 pkg/github/minimal_types.go,重点关注 IssueFragment、fragmentToMinimalIssue()、MinimalPullRequest 和 convertToMinimalPullRequest()。验证 list_issues 的 GraphQL 响应以及 list_pull_requests 和 pull_request_read 的 REST 响应;当每个响应都包含带有可用作者关联值的 author_association 时,工作即完成。
由索引模型根据 Issue 内容生成。
描述
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()
- 主要语言
- Go
- 星标
- 33.1k
- 派生
- 5k
- 平均合并
- 2 天 1 小时
- 30 天内合并 PR
- 25
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
github/github-mcp-server 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 84/100
github/github-mcp-server#3235 ·
-
enhancement
难度 1/5 1 小时以内 新手友好度 88/100
github/github-mcp-server#3042 · 2 条评论 ·
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
github/github-mcp-server#3032 · 1 个 reaction ·
-
难度 2/5 1-3 小时 新手友好度 74/100
github/github-mcp-server#2803 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 76/100
github/github-mcp-server#2740 ·
查看 github/github-mcp-server 的全部 Issue
相似的 Issue
-
area/dev-productivity area/disaster-recovery area/ipcei kind/enhancement
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 1/5 1 小时以内 新手友好度 85/100
-
难度 2/5 1-3 小时 新手友好度 75/100
-
kind/bug status/0-triage
难度 2/5 1-3 小时 新手友好度 75/100
-
🤔 refinement needed
难度 2/5 1-3 小时 新手友好度 75/100
equinor/radix-operator#1979 ·