Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Add granular `add_label_to_issue` / `remove_label_from_issue` tools

Offen
#2,724 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
72/100
Issue-Typ
Feature
Klarheit
Klar beschrieben
Aktivitätsstatus
Ruhig
Tech-Stack
go
Bereich
api

Rechercherichtung

Beginne in pkg/github/issues_granular.go und vergleiche die vorgeschlagenen Tools mit dem bestehenden Muster aus add_sub_issue und remove_sub_issue. Verwende die aufgeführten REST-Endpunkte zum Hinzufügen und Entfernen eines einzelnen Labels und überprüfe anschließend, dass jede Operation die anderen Labels des Issues erhält und ein einzelnes Issue und Label verarbeitet.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.

Vorherrschende Sprache
Go
Sterne
33.1k
Forks
5k
Ø Merge
2 T. 1 Std.
Gemergte PRs (30 T.)
25

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus github/github-mcp-server

Alle Issues in github/github-mcp-server

Ähnliche Issues

Weitere Issues zu Go

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.