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

Add granular `add_label_to_issue` / `remove_label_from_issue` tools

Aperta
#2,724 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

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

Direzione di ricerca

Inizia da pkg/github/issues_granular.go e confronta gli strumenti proposti con il pattern esistente di add_sub_issue e remove_sub_issue. Usa gli endpoint REST elencati per aggiungere e rimuovere una singola label, quindi verifica che ogni operazione preservi le altre label dell'issue e gestisca una singola issue e una singola label.

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

Descrizione

request ai review
Describe the feature or problem you'd like to solve

There is currently no way to remove a single label from an issue without replacing the issue's entire label set. The only issue-label tool, update_issue_labels (pkg/github/issues_granular.go), states in its own description: "This replaces the current labels with the provided list."

To remove one label, a client must:

  1. Read all current labels on the issue
  2. Compute the full set minus the one to remove
  3. Send the complete remaining set back

If step 1 or 2 is incomplete or stale, labels are silently dropped. This read-modify-write pattern is error-prone for agents and adds round-trips.

Proposed solution

Add discrete, non-destructive tools backed by the existing REST endpoints:

  • add_label_to_issuePOST /repos/{owner}/{repo}/issues/{issue_number}/labels
  • remove_label_from_issueDELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}

These operate on a single label without touching the rest of the issue's labels.

Precedent in the codebase

Sub-issues already follow exactly this granular pattern with add_sub_issue and remove_sub_issue, rather than forcing a full-set replacement. Labels-on-issues would benefit from the same treatment.

Additional context

Related to #2412 (bulk/batch label operations). This proposal is the single-issue, single-label complement: #2412 covers operating across many issues at once, while this covers safely adding/removing one label on one issue without clobbering the others.

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.