Missing author_association field in list_issues and pull request responses
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 72/100
Rechercherichtung
Beginne mit dem Lesen von pkg/github/issues.go und pkg/github/minimal_types.go und konzentriere dich dabei auf IssueFragment, fragmentToMinimalIssue(), MinimalPullRequest und convertToMinimalPullRequest(). Überprüfe die GraphQL-Antwort von list_issues sowie die REST-Antworten von list_pull_requests und pull_request_read; die Arbeit ist abgeschlossen, wenn jede davon author_association mit dem verfügbaren Wert der Autorenzuordnung enthält.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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()
- Vorherrschende Sprache
- Go
- Sterne
- 33.1k
- Forks
- 5k
- Ø Merge
- 2 T. 3 Std.
- Gemergte PRs (30 T.)
- 18
Entwicklungsumgebung
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus github/github-mcp-server
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
github/github-mcp-server#3235 ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
github/github-mcp-server#3042 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
github/github-mcp-server#3032 · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
github/github-mcp-server#2803 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
github/github-mcp-server#2740 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in github/github-mcp-server
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 92/100
GoogleCloudPlatform/k8s-config-connector#13462 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
coder/coder#29955 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
microsoft/TypeScript#64453 ·
Maintainer antworten meist innerhalb von 1 Tag
-
OpenAI-compatible endpoint: response ids have only 999 possible values (chatcmpl-rand.Intn(999))Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag