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

Move compatibility for non github.com targets to `github.With<THING>` options

Offen
#4,237 6 Kommentare 2 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
35/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Ruhig
Tech-Stack
go

Rechercherichtung

Beginne mit der Überprüfung der standardmäßigen Client-Einrichtung, der vorhandenen Option github.WithEnterpriseURLs und der im Vorschlag beschriebenen Kompatibilitätsprüfungen. Verfolge, wie API-Versionen und Ziele außerhalb von github.com derzeit konfiguriert werden. Als erledigt gilt die Aufgabe, wenn das vorgeschlagene Verhalten von WithAPIVersion, WithAdvancedServer und WithEnterpriseCloud konsistent entworfen und implementiert ist und die veraltete Option berücksichtigt wird.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

I propose that all compatibility functionality not required for the github.com target be removed from the default client setup and only be included via a github.With<THING> option. This (hopefully) would make the default client surface area simpler to understand. The justification for this is that you already need to use github.WithEnterpriseURLs to target non github.com. I propose the following changes to adopt this pattern, with the potential for other capabilities (such as enabling/disabling preview endpoints) to be added later.

  • Default to the latest API version (2026-03-10)
    • Functions that require a specific version now check against the client version and error if not valid
  • Add github.WithAPIVersion to explicitly set a version
    • Set at the client/service level
  • Add github.WithAdvancedServer to enable GHAS support
    • Better validation of inputs
    • Support setting version
    • Add compatibility accordingly
  • Add github.WithEnterpriseCloud to enable GHEC support
    • Better validation of inputs
  • Deprecate github.WithEnterpriseURLs

I'd appreciate any feedback on this proposal.

cc: @gmlewis - @alexandear - @zyfy29 - @Not-Dhananjay-Mishra - @munlicode

Vorherrschende Sprache
Go
Sterne
11.3k
Forks
2.6k
Ø Merge
2 T. 16 Std.
Gemergte PRs (30 T.)
35

Entwicklungsumgebung

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 google/go-github

Alle Issues in google/go-github

Ähnliche Issues

Weitere Issues zu Go

Neue Issues direkt in Ihr Postfach

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