Skip to content

Commit 7179334

Browse files
committed
fix(private-registry): update API version in documentation URLs for private registries
1 parent 0070051 commit 7179334

3 files changed

Lines changed: 15 additions & 13 deletions

File tree

github/private_registries.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ type UpdateOrganizationPrivateRegistry struct {
234234

235235
// ListOrganizationPrivateRegistries lists private registries for an organization.
236236
//
237-
// GitHub API docs: https://docs.github.com/rest/private-registries/organization-configurations?apiVersion=2022-11-28#list-private-registries-for-an-organization
237+
// GitHub API docs: https://docs.github.com/rest/private-registries/organization-configurations?apiVersion=2026-03-10#list-private-registries-for-an-organization
238238
//
239239
//meta:operation GET /orgs/{org}/private-registries
240240
func (s *PrivateRegistriesService) ListOrganizationPrivateRegistries(ctx context.Context, org string, opts *ListOptions) (*PrivateRegistries, *Response, error) {
@@ -259,7 +259,7 @@ func (s *PrivateRegistriesService) ListOrganizationPrivateRegistries(ctx context
259259

260260
// CreateOrganizationPrivateRegistry creates a private registry configuration with an encrypted value for an organization.
261261
//
262-
// GitHub API docs: https://docs.github.com/rest/private-registries/organization-configurations?apiVersion=2022-11-28#create-a-private-registry-for-an-organization
262+
// GitHub API docs: https://docs.github.com/rest/private-registries/organization-configurations?apiVersion=2026-03-10#create-a-private-registry-for-an-organization
263263
//
264264
//meta:operation POST /orgs/{org}/private-registries
265265
func (s *PrivateRegistriesService) CreateOrganizationPrivateRegistry(ctx context.Context, org string, privateRegistry CreateOrganizationPrivateRegistry) (*PrivateRegistry, *Response, error) {
@@ -280,7 +280,7 @@ func (s *PrivateRegistriesService) CreateOrganizationPrivateRegistry(ctx context
280280

281281
// GetOrganizationPrivateRegistriesPublicKey retrieves the public key for encrypting secrets for an organization's private registries.
282282
//
283-
// GitHub API docs: https://docs.github.com/rest/private-registries/organization-configurations?apiVersion=2022-11-28#get-private-registries-public-key-for-an-organization
283+
// GitHub API docs: https://docs.github.com/rest/private-registries/organization-configurations?apiVersion=2026-03-10#get-private-registries-public-key-for-an-organization
284284
//
285285
//meta:operation GET /orgs/{org}/private-registries/public-key
286286
func (s *PrivateRegistriesService) GetOrganizationPrivateRegistriesPublicKey(ctx context.Context, org string) (*PublicKey, *Response, error) {
@@ -302,7 +302,7 @@ func (s *PrivateRegistriesService) GetOrganizationPrivateRegistriesPublicKey(ctx
302302
// GetOrganizationPrivateRegistry gets a specific private registry for an organization.
303303
// The `name` parameter is the name of the private registry to retrieve. It is the same as PrivateRegistry.Name.
304304
//
305-
// GitHub API docs: https://docs.github.com/rest/private-registries/organization-configurations?apiVersion=2022-11-28#get-a-private-registry-for-an-organization
305+
// GitHub API docs: https://docs.github.com/rest/private-registries/organization-configurations?apiVersion=2026-03-10#get-a-private-registry-for-an-organization
306306
//
307307
//meta:operation GET /orgs/{org}/private-registries/{secret_name}
308308
func (s *PrivateRegistriesService) GetOrganizationPrivateRegistry(ctx context.Context, org, secretName string) (*PrivateRegistry, *Response, error) {
@@ -325,7 +325,7 @@ func (s *PrivateRegistriesService) GetOrganizationPrivateRegistry(ctx context.Co
325325
// UpdateOrganizationPrivateRegistry updates a specific private registry for an organization.
326326
// The `name` parameter is the name of the private registry to update. It is the same as PrivateRegistry.Name.
327327
//
328-
// GitHub API docs: https://docs.github.com/rest/private-registries/organization-configurations?apiVersion=2022-11-28#update-a-private-registry-for-an-organization
328+
// GitHub API docs: https://docs.github.com/rest/private-registries/organization-configurations?apiVersion=2026-03-10#update-a-private-registry-for-an-organization
329329
//
330330
//meta:operation PATCH /orgs/{org}/private-registries/{secret_name}
331331
func (s *PrivateRegistriesService) UpdateOrganizationPrivateRegistry(ctx context.Context, org, secretName string, privateRegistry UpdateOrganizationPrivateRegistry) (*Response, error) {
@@ -342,7 +342,7 @@ func (s *PrivateRegistriesService) UpdateOrganizationPrivateRegistry(ctx context
342342
// DeleteOrganizationPrivateRegistry deletes a specific private registry for an organization.
343343
// The `name` parameter is the name of the private registry to delete. It is the same as PrivateRegistry.Name.
344344
//
345-
// GitHub API docs: https://docs.github.com/rest/private-registries/organization-configurations?apiVersion=2022-11-28#delete-a-private-registry-for-an-organization
345+
// GitHub API docs: https://docs.github.com/rest/private-registries/organization-configurations?apiVersion=2026-03-10#delete-a-private-registry-for-an-organization
346346
//
347347
//meta:operation DELETE /orgs/{org}/private-registries/{secret_name}
348348
func (s *PrivateRegistriesService) DeleteOrganizationPrivateRegistry(ctx context.Context, org, secretName string) (*Response, error) {

openapi_operations.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3439,37 +3439,37 @@ openapi_operations:
34393439
openapi_files:
34403440
- descriptions/ghes-3.20/ghes-3.20.json
34413441
- name: GET /orgs/{org}/private-registries
3442-
documentation_url: https://docs.github.com/rest/private-registries/organization-configurations#list-private-registries-for-an-organization
3442+
documentation_url: https://docs.github.com/rest/private-registries/organization-configurations?apiVersion=2026-03-10#list-private-registries-for-an-organization
34433443
openapi_files:
34443444
- descriptions/api.github.com/api.github.com.json
34453445
- descriptions/ghec/ghec.json
34463446
- descriptions/ghes-3.20/ghes-3.20.json
34473447
- name: POST /orgs/{org}/private-registries
3448-
documentation_url: https://docs.github.com/rest/private-registries/organization-configurations#create-a-private-registry-for-an-organization
3448+
documentation_url: https://docs.github.com/rest/private-registries/organization-configurations?apiVersion=2026-03-10#create-a-private-registry-for-an-organization
34493449
openapi_files:
34503450
- descriptions/api.github.com/api.github.com.json
34513451
- descriptions/ghec/ghec.json
34523452
- descriptions/ghes-3.20/ghes-3.20.json
34533453
- name: GET /orgs/{org}/private-registries/public-key
3454-
documentation_url: https://docs.github.com/rest/private-registries/organization-configurations#get-private-registries-public-key-for-an-organization
3454+
documentation_url: https://docs.github.com/rest/private-registries/organization-configurations?apiVersion=2026-03-10#get-private-registries-public-key-for-an-organization
34553455
openapi_files:
34563456
- descriptions/api.github.com/api.github.com.json
34573457
- descriptions/ghec/ghec.json
34583458
- descriptions/ghes-3.20/ghes-3.20.json
34593459
- name: DELETE /orgs/{org}/private-registries/{secret_name}
3460-
documentation_url: https://docs.github.com/rest/private-registries/organization-configurations#delete-a-private-registry-for-an-organization
3460+
documentation_url: https://docs.github.com/rest/private-registries/organization-configurations?apiVersion=2026-03-10#delete-a-private-registry-for-an-organization
34613461
openapi_files:
34623462
- descriptions/api.github.com/api.github.com.json
34633463
- descriptions/ghec/ghec.json
34643464
- descriptions/ghes-3.20/ghes-3.20.json
34653465
- name: GET /orgs/{org}/private-registries/{secret_name}
3466-
documentation_url: https://docs.github.com/rest/private-registries/organization-configurations#get-a-private-registry-for-an-organization
3466+
documentation_url: https://docs.github.com/rest/private-registries/organization-configurations?apiVersion=2026-03-10#get-a-private-registry-for-an-organization
34673467
openapi_files:
34683468
- descriptions/api.github.com/api.github.com.json
34693469
- descriptions/ghec/ghec.json
34703470
- descriptions/ghes-3.20/ghes-3.20.json
34713471
- name: PATCH /orgs/{org}/private-registries/{secret_name}
3472-
documentation_url: https://docs.github.com/rest/private-registries/organization-configurations#update-a-private-registry-for-an-organization
3472+
documentation_url: https://docs.github.com/rest/private-registries/organization-configurations?apiVersion=2026-03-10#update-a-private-registry-for-an-organization
34733473
openapi_files:
34743474
- descriptions/api.github.com/api.github.com.json
34753475
- descriptions/ghec/ghec.json

tools/metadata/metadata.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,9 @@ func normalizeDocURL(docURL string) string {
502502

503503
u.Path = cleanPath
504504
q := u.Query()
505-
q.Set("apiVersion", metadataDocsAPIVersion)
505+
if q.Get("apiVersion") == "" {
506+
q.Set("apiVersion", metadataDocsAPIVersion)
507+
}
506508
u.RawQuery = q.Encode()
507509
return u.String()
508510
}

0 commit comments

Comments
 (0)