Missing author_association field in list_issues and pull request responses
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 72/100
Hướng nghiên cứu
Bắt đầu bằng cách đọc pkg/github/issues.go và pkg/github/minimal_types.go, tập trung vào IssueFragment, fragmentToMinimalIssue(), MinimalPullRequest và convertToMinimalPullRequest(). Xác minh phản hồi GraphQL của list_issues cùng các phản hồi REST của list_pull_requests và pull_request_read; công việc hoàn tất khi mỗi phản hồi đều bao gồm author_association với giá trị liên kết tác giả có sẵn.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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()
- Ngôn ngữ chính
- Go
- Star
- 33.1k
- Fork
- 5k
- Merge trung bình
- 2 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 25
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của github/github-mcp-server
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
github/github-mcp-server#3235 ·
-
enhancement
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
github/github-mcp-server#3042 · 2 bình luận ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
github/github-mcp-server#3032 · 1 reaction ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
github/github-mcp-server#2803 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
github/github-mcp-server#2740 ·
Tất cả issue của github/github-mcp-server
Issue tương tự
-
textual definition
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
geneontology/go-ontology#32653 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
-
needs design
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Priority/High ready-for-agent Severity/Major Type/Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100