Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Missing author_association field in list_issues and pull request responses

Aperta Adatta ai principianti
#2,250 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
72/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Tranquilla
Stack tecnologico
github, go, graphql
Ambito
api

Direzione di ricerca

Inizia leggendo pkg/github/issues.go e pkg/github/minimal_types.go, concentrandoti su IssueFragment, fragmentToMinimalIssue(), MinimalPullRequest e convertToMinimalPullRequest(). Verifica la risposta GraphQL di list_issues e le risposte REST di list_pull_requests e pull_request_read; il lavoro è completato quando ciascuna include author_association con il valore di associazione dell’autore disponibile.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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)
  • IssueFragment struct does not request authorAssociation in the GraphQL query
  • fragmentToMinimalIssue() does not populate AuthorAssociation in MinimalIssue
  • Note: The REST path in convertToMinimalIssue() correctly sets AuthorAssociation: issue.GetAuthorAssociation()
2. list_pull_requests and pull_request_read (REST path)
  • MinimalPullRequest struct is missing the author_association field entirely
  • convertToMinimalPullRequest() does not set it
  • The raw *github.PullRequest from the go-github library has AuthorAssociation available via pr.GetAuthorAssociation()
Already Working
  • issue_read (single issue GET) — uses REST convertToMinimalIssue() which includes author_association
  • get_review_commentsMinimalPullRequestReview includes author_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):
  1. Add AuthorAssociation githubv4.String to IssueFragment struct in issues.go
  2. Set AuthorAssociation: string(fragment.AuthorAssociation) in fragmentToMinimalIssue() in minimal_types.go
For pull requests (REST):
  1. Add AuthorAssociation string \x60json:"author_association,omitempty"\x60 to MinimalPullRequest struct in minimal_types.go
  2. Set AuthorAssociation: pr.GetAuthorAssociation() in convertToMinimalPullRequest() in minimal_types.go

References

  • pkg/github/issues.goIssueFragment struct
  • pkg/github/minimal_types.goMinimalIssue, MinimalPullRequest, fragmentToMinimalIssue(), convertToMinimalPullRequest()
Lingua principale
Go
Stelle
33.1k
Fork
5k
Merge medio
2g 1h
PR unite (30g)
25

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di github/github-mcp-server

Tutte le issue di github/github-mcp-server

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.