Skip to content

Commit 8c1032a

Browse files
authored
feat!: Update deprecated endpoints in github/action_variables.go (#3104)
Fixes: #3103. BREAKING-CHANGE: The following endpoints now take `owner` and `repo` (string) names instead of an integer repo ID: ActionsService.ListEnvVariables ActionsService.GetEnvVariable ActionsService.CreateEnvVariable ActionsService.UpdateEnvVariable ActionsService.DeleteEnvVariable
1 parent 1891239 commit 8c1032a

13 files changed

+1300
-1158
lines changed

github/actions_secrets.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ func (s *ActionsService) GetOrgPublicKey(ctx context.Context, org string) (*Publ
8484

8585
// GetEnvPublicKey gets a public key that should be used for secret encryption.
8686
//
87-
// GitHub API docs: https://docs.github.com/rest/actions/secrets#get-an-environment-public-key
87+
// GitHub API docs: https://docs.github.com/enterprise-server@3.7/rest/actions/secrets#get-an-environment-public-key
8888
//
8989
//meta:operation GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key
9090
func (s *ActionsService) GetEnvPublicKey(ctx context.Context, repoID int, env string) (*PublicKey, *Response, error) {
@@ -162,7 +162,7 @@ func (s *ActionsService) ListOrgSecrets(ctx context.Context, org string, opts *L
162162

163163
// ListEnvSecrets lists all secrets available in an environment.
164164
//
165-
// GitHub API docs: https://docs.github.com/rest/actions/secrets#list-environment-secrets
165+
// GitHub API docs: https://docs.github.com/enterprise-server@3.7/rest/actions/secrets#list-environment-secrets
166166
//
167167
//meta:operation GET /repositories/{repository_id}/environments/{environment_name}/secrets
168168
func (s *ActionsService) ListEnvSecrets(ctx context.Context, repoID int, env string, opts *ListOptions) (*Secrets, *Response, error) {
@@ -207,7 +207,7 @@ func (s *ActionsService) GetOrgSecret(ctx context.Context, org, name string) (*S
207207

208208
// GetEnvSecret gets a single environment secret without revealing its encrypted value.
209209
//
210-
// GitHub API docs: https://docs.github.com/rest/actions/secrets#get-an-environment-secret
210+
// GitHub API docs: https://docs.github.com/enterprise-server@3.7/rest/actions/secrets#get-an-environment-secret
211211
//
212212
//meta:operation GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}
213213
func (s *ActionsService) GetEnvSecret(ctx context.Context, repoID int, env, secretName string) (*Secret, *Response, error) {
@@ -262,7 +262,7 @@ func (s *ActionsService) CreateOrUpdateOrgSecret(ctx context.Context, org string
262262

263263
// CreateOrUpdateEnvSecret creates or updates a single environment secret with an encrypted value.
264264
//
265-
// GitHub API docs: https://docs.github.com/rest/actions/secrets#create-or-update-an-environment-secret
265+
// GitHub API docs: https://docs.github.com/enterprise-server@3.7/rest/actions/secrets#create-or-update-an-environment-secret
266266
//
267267
//meta:operation PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}
268268
func (s *ActionsService) CreateOrUpdateEnvSecret(ctx context.Context, repoID int, env string, eSecret *EncryptedSecret) (*Response, error) {
@@ -301,7 +301,7 @@ func (s *ActionsService) DeleteOrgSecret(ctx context.Context, org, name string)
301301

302302
// DeleteEnvSecret deletes a secret in an environment using the secret name.
303303
//
304-
// GitHub API docs: https://docs.github.com/rest/actions/secrets#delete-an-environment-secret
304+
// GitHub API docs: https://docs.github.com/enterprise-server@3.7/rest/actions/secrets#delete-an-environment-secret
305305
//
306306
//meta:operation DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}
307307
func (s *ActionsService) DeleteEnvSecret(ctx context.Context, repoID int, env, secretName string) (*Response, error) {

github/actions_variables.go

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ func (s *ActionsService) ListOrgVariables(ctx context.Context, org string, opts
8383
//
8484
// GitHub API docs: https://docs.github.com/rest/actions/variables#list-environment-variables
8585
//
86-
//meta:operation GET /repositories/{repository_id}/environments/{environment_name}/variables
87-
func (s *ActionsService) ListEnvVariables(ctx context.Context, repoID int, env string, opts *ListOptions) (*ActionsVariables, *Response, error) {
88-
url := fmt.Sprintf("repositories/%v/environments/%v/variables", repoID, env)
86+
//meta:operation GET /repos/{owner}/{repo}/environments/{environment_name}/variables
87+
func (s *ActionsService) ListEnvVariables(ctx context.Context, owner, repo, env string, opts *ListOptions) (*ActionsVariables, *Response, error) {
88+
url := fmt.Sprintf("repos/%v/%v/environments/%v/variables", owner, repo, env)
8989
return s.listVariables(ctx, url, opts)
9090
}
9191

@@ -128,9 +128,9 @@ func (s *ActionsService) GetOrgVariable(ctx context.Context, org, name string) (
128128
//
129129
// GitHub API docs: https://docs.github.com/rest/actions/variables#get-an-environment-variable
130130
//
131-
//meta:operation GET /repositories/{repository_id}/environments/{environment_name}/variables/{name}
132-
func (s *ActionsService) GetEnvVariable(ctx context.Context, repoID int, env, variableName string) (*ActionsVariable, *Response, error) {
133-
url := fmt.Sprintf("repositories/%v/environments/%v/variables/%v", repoID, env, variableName)
131+
//meta:operation GET /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}
132+
func (s *ActionsService) GetEnvVariable(ctx context.Context, owner, repo, env, variableName string) (*ActionsVariable, *Response, error) {
133+
url := fmt.Sprintf("repos/%v/%v/environments/%v/variables/%v", owner, repo, env, variableName)
134134
return s.getVariable(ctx, url)
135135
}
136136

@@ -166,9 +166,9 @@ func (s *ActionsService) CreateOrgVariable(ctx context.Context, org string, vari
166166
//
167167
// GitHub API docs: https://docs.github.com/rest/actions/variables#create-an-environment-variable
168168
//
169-
//meta:operation POST /repositories/{repository_id}/environments/{environment_name}/variables
170-
func (s *ActionsService) CreateEnvVariable(ctx context.Context, repoID int, env string, variable *ActionsVariable) (*Response, error) {
171-
url := fmt.Sprintf("repositories/%v/environments/%v/variables", repoID, env)
169+
//meta:operation POST /repos/{owner}/{repo}/environments/{environment_name}/variables
170+
func (s *ActionsService) CreateEnvVariable(ctx context.Context, owner, repo, env string, variable *ActionsVariable) (*Response, error) {
171+
url := fmt.Sprintf("repos/%v/%v/environments/%v/variables", owner, repo, env)
172172
return s.postVariable(ctx, url, variable)
173173
}
174174

@@ -204,9 +204,9 @@ func (s *ActionsService) UpdateOrgVariable(ctx context.Context, org string, vari
204204
//
205205
// GitHub API docs: https://docs.github.com/rest/actions/variables#update-an-environment-variable
206206
//
207-
//meta:operation PATCH /repositories/{repository_id}/environments/{environment_name}/variables/{name}
208-
func (s *ActionsService) UpdateEnvVariable(ctx context.Context, repoID int, env string, variable *ActionsVariable) (*Response, error) {
209-
url := fmt.Sprintf("repositories/%v/environments/%v/variables/%v", repoID, env, variable.Name)
207+
//meta:operation PATCH /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}
208+
func (s *ActionsService) UpdateEnvVariable(ctx context.Context, owner, repo, env string, variable *ActionsVariable) (*Response, error) {
209+
url := fmt.Sprintf("repos/%v/%v/environments/%v/variables/%v", owner, repo, env, variable.Name)
210210
return s.patchVariable(ctx, url, variable)
211211
}
212212

@@ -243,9 +243,9 @@ func (s *ActionsService) DeleteOrgVariable(ctx context.Context, org, name string
243243
//
244244
// GitHub API docs: https://docs.github.com/rest/actions/variables#delete-an-environment-variable
245245
//
246-
//meta:operation DELETE /repositories/{repository_id}/environments/{environment_name}/variables/{name}
247-
func (s *ActionsService) DeleteEnvVariable(ctx context.Context, repoID int, env, variableName string) (*Response, error) {
248-
url := fmt.Sprintf("repositories/%v/environments/%v/variables/%v", repoID, env, variableName)
246+
//meta:operation DELETE /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}
247+
func (s *ActionsService) DeleteEnvVariable(ctx context.Context, owner, repo, env, variableName string) (*Response, error) {
248+
url := fmt.Sprintf("repos/%v/%v/environments/%v/variables/%v", owner, repo, env, variableName)
249249
return s.deleteVariable(ctx, url)
250250
}
251251

github/actions_variables_test.go

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -533,15 +533,15 @@ func TestActionsService_ListEnvVariables(t *testing.T) {
533533
client, mux, _, teardown := setup()
534534
defer teardown()
535535

536-
mux.HandleFunc("/repositories/1/environments/e/variables", func(w http.ResponseWriter, r *http.Request) {
536+
mux.HandleFunc("/repos/usr/1/environments/e/variables", func(w http.ResponseWriter, r *http.Request) {
537537
testMethod(t, r, "GET")
538538
testFormValues(t, r, values{"per_page": "2", "page": "2"})
539539
fmt.Fprint(w, `{"total_count":4,"variables":[{"name":"A","value":"AA","created_at":"2019-01-02T15:04:05Z","updated_at":"2020-01-02T15:04:05Z"},{"name":"B","value":"BB","created_at":"2019-01-02T15:04:05Z","updated_at":"2020-01-02T15:04:05Z"}]}`)
540540
})
541541

542542
opts := &ListOptions{Page: 2, PerPage: 2}
543543
ctx := context.Background()
544-
variables, _, err := client.Actions.ListEnvVariables(ctx, 1, "e", opts)
544+
variables, _, err := client.Actions.ListEnvVariables(ctx, "usr", "1", "e", opts)
545545
if err != nil {
546546
t.Errorf("Actions.ListEnvVariables returned error: %v", err)
547547
}
@@ -559,12 +559,12 @@ func TestActionsService_ListEnvVariables(t *testing.T) {
559559

560560
const methodName = "ListEnvVariables"
561561
testBadOptions(t, methodName, func() (err error) {
562-
_, _, err = client.Actions.ListEnvVariables(ctx, 0.0, "\n", opts)
562+
_, _, err = client.Actions.ListEnvVariables(ctx, "usr", "0", "\n", opts)
563563
return err
564564
})
565565

566566
testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) {
567-
got, resp, err := client.Actions.ListEnvVariables(ctx, 1, "e", opts)
567+
got, resp, err := client.Actions.ListEnvVariables(ctx, "usr", "1", "e", opts)
568568
if got != nil {
569569
t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got)
570570
}
@@ -576,13 +576,13 @@ func TestActionsService_GetEnvVariable(t *testing.T) {
576576
client, mux, _, teardown := setup()
577577
defer teardown()
578578

579-
mux.HandleFunc("/repositories/1/environments/e/variables/variable", func(w http.ResponseWriter, r *http.Request) {
579+
mux.HandleFunc("/repos/usr/1/environments/e/variables/variable", func(w http.ResponseWriter, r *http.Request) {
580580
testMethod(t, r, "GET")
581581
fmt.Fprint(w, `{"name":"variable","value":"VAR","created_at":"2019-01-02T15:04:05Z","updated_at":"2020-01-02T15:04:05Z"}`)
582582
})
583583

584584
ctx := context.Background()
585-
variable, _, err := client.Actions.GetEnvVariable(ctx, 1, "e", "variable")
585+
variable, _, err := client.Actions.GetEnvVariable(ctx, "usr", "1", "e", "variable")
586586
if err != nil {
587587
t.Errorf("Actions.GetEnvVariable returned error: %v", err)
588588
}
@@ -599,12 +599,12 @@ func TestActionsService_GetEnvVariable(t *testing.T) {
599599

600600
const methodName = "GetEnvVariable"
601601
testBadOptions(t, methodName, func() (err error) {
602-
_, _, err = client.Actions.GetEnvVariable(ctx, 0.0, "\n", "\n")
602+
_, _, err = client.Actions.GetEnvVariable(ctx, "usr", "0", "\n", "\n")
603603
return err
604604
})
605605

606606
testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) {
607-
got, resp, err := client.Actions.GetEnvVariable(ctx, 1, "e", "variable")
607+
got, resp, err := client.Actions.GetEnvVariable(ctx, "usr", "1", "e", "variable")
608608
if got != nil {
609609
t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got)
610610
}
@@ -616,7 +616,7 @@ func TestActionsService_CreateEnvVariable(t *testing.T) {
616616
client, mux, _, teardown := setup()
617617
defer teardown()
618618

619-
mux.HandleFunc("/repositories/1/environments/e/variables", func(w http.ResponseWriter, r *http.Request) {
619+
mux.HandleFunc("/repos/usr/1/environments/e/variables", func(w http.ResponseWriter, r *http.Request) {
620620
testMethod(t, r, "POST")
621621
testHeader(t, r, "Content-Type", "application/json")
622622
testBody(t, r, `{"name":"variable","value":"VAR"}`+"\n")
@@ -628,27 +628,27 @@ func TestActionsService_CreateEnvVariable(t *testing.T) {
628628
Value: "VAR",
629629
}
630630
ctx := context.Background()
631-
_, err := client.Actions.CreateEnvVariable(ctx, 1, "e", input)
631+
_, err := client.Actions.CreateEnvVariable(ctx, "usr", "1", "e", input)
632632
if err != nil {
633633
t.Errorf("Actions.CreateEnvVariable returned error: %v", err)
634634
}
635635

636636
const methodName = "CreateEnvVariable"
637637
testBadOptions(t, methodName, func() (err error) {
638-
_, err = client.Actions.CreateEnvVariable(ctx, 0.0, "\n", input)
638+
_, err = client.Actions.CreateEnvVariable(ctx, "usr", "0", "\n", input)
639639
return err
640640
})
641641

642642
testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) {
643-
return client.Actions.CreateEnvVariable(ctx, 1, "e", input)
643+
return client.Actions.CreateEnvVariable(ctx, "usr", "1", "e", input)
644644
})
645645
}
646646

647647
func TestActionsService_UpdateEnvVariable(t *testing.T) {
648648
client, mux, _, teardown := setup()
649649
defer teardown()
650650

651-
mux.HandleFunc("/repositories/1/environments/e/variables/variable", func(w http.ResponseWriter, r *http.Request) {
651+
mux.HandleFunc("/repos/usr/1/environments/e/variables/variable", func(w http.ResponseWriter, r *http.Request) {
652652
testMethod(t, r, "PATCH")
653653
testHeader(t, r, "Content-Type", "application/json")
654654
testBody(t, r, `{"name":"variable","value":"VAR"}`+"\n")
@@ -660,44 +660,44 @@ func TestActionsService_UpdateEnvVariable(t *testing.T) {
660660
Value: "VAR",
661661
}
662662
ctx := context.Background()
663-
_, err := client.Actions.UpdateEnvVariable(ctx, 1, "e", input)
663+
_, err := client.Actions.UpdateEnvVariable(ctx, "usr", "1", "e", input)
664664
if err != nil {
665665
t.Errorf("Actions.UpdateEnvVariable returned error: %v", err)
666666
}
667667

668668
const methodName = "UpdateEnvVariable"
669669
testBadOptions(t, methodName, func() (err error) {
670-
_, err = client.Actions.UpdateEnvVariable(ctx, 0.0, "\n", input)
670+
_, err = client.Actions.UpdateEnvVariable(ctx, "usr", "1", "\n", input)
671671
return err
672672
})
673673

674674
testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) {
675-
return client.Actions.UpdateEnvVariable(ctx, 1, "e", input)
675+
return client.Actions.UpdateEnvVariable(ctx, "usr", "1", "e", input)
676676
})
677677
}
678678

679679
func TestActionsService_DeleteEnvVariable(t *testing.T) {
680680
client, mux, _, teardown := setup()
681681
defer teardown()
682682

683-
mux.HandleFunc("/repositories/1/environments/e/variables/variable", func(w http.ResponseWriter, r *http.Request) {
683+
mux.HandleFunc("/repos/usr/1/environments/e/variables/variable", func(w http.ResponseWriter, r *http.Request) {
684684
testMethod(t, r, "DELETE")
685685
})
686686

687687
ctx := context.Background()
688-
_, err := client.Actions.DeleteEnvVariable(ctx, 1, "e", "variable")
688+
_, err := client.Actions.DeleteEnvVariable(ctx, "usr", "1", "e", "variable")
689689
if err != nil {
690690
t.Errorf("Actions.DeleteEnvVariable returned error: %v", err)
691691
}
692692

693693
const methodName = "DeleteEnvVariable"
694694
testBadOptions(t, methodName, func() (err error) {
695-
_, err = client.Actions.DeleteEnvVariable(ctx, 0.0, "\n", "\n")
695+
_, err = client.Actions.DeleteEnvVariable(ctx, "usr", "0", "\n", "\n")
696696
return err
697697
})
698698

699699
testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) {
700-
return client.Actions.DeleteEnvVariable(ctx, 1, "r", "variable")
700+
return client.Actions.DeleteEnvVariable(ctx, "usr", "1", "r", "variable")
701701
})
702702
}
703703

github/admin.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ func (m Enterprise) String() string {
8282

8383
// UpdateUserLDAPMapping updates the mapping between a GitHub user and an LDAP user.
8484
//
85-
// GitHub API docs: https://docs.github.com/enterprise-server@3.11/rest/enterprise-admin/ldap#update-ldap-mapping-for-a-user
85+
// GitHub API docs: https://docs.github.com/enterprise-server@3.12/rest/enterprise-admin/ldap#update-ldap-mapping-for-a-user
8686
//
8787
//meta:operation PATCH /admin/ldap/users/{username}/mapping
8888
func (s *AdminService) UpdateUserLDAPMapping(ctx context.Context, user string, mapping *UserLDAPMapping) (*UserLDAPMapping, *Response, error) {
@@ -103,7 +103,7 @@ func (s *AdminService) UpdateUserLDAPMapping(ctx context.Context, user string, m
103103

104104
// UpdateTeamLDAPMapping updates the mapping between a GitHub team and an LDAP group.
105105
//
106-
// GitHub API docs: https://docs.github.com/enterprise-server@3.11/rest/enterprise-admin/ldap#update-ldap-mapping-for-a-team
106+
// GitHub API docs: https://docs.github.com/enterprise-server@3.12/rest/enterprise-admin/ldap#update-ldap-mapping-for-a-team
107107
//
108108
//meta:operation PATCH /admin/ldap/teams/{team_id}/mapping
109109
func (s *AdminService) UpdateTeamLDAPMapping(ctx context.Context, team int64, mapping *TeamLDAPMapping) (*TeamLDAPMapping, *Response, error) {

github/admin_orgs.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ type createOrgRequest struct {
2222
// Note that only a subset of the org fields are used and org must
2323
// not be nil.
2424
//
25-
// GitHub API docs: https://docs.github.com/enterprise-server@3.11/rest/enterprise-admin/orgs#create-an-organization
25+
// GitHub API docs: https://docs.github.com/enterprise-server@3.12/rest/enterprise-admin/orgs#create-an-organization
2626
//
2727
//meta:operation POST /admin/organizations
2828
func (s *AdminService) CreateOrg(ctx context.Context, org *Organization, admin string) (*Organization, *Response, error) {
@@ -61,7 +61,7 @@ type RenameOrgResponse struct {
6161

6262
// RenameOrg renames an organization in GitHub Enterprise.
6363
//
64-
// GitHub API docs: https://docs.github.com/enterprise-server@3.11/rest/enterprise-admin/orgs#update-an-organization-name
64+
// GitHub API docs: https://docs.github.com/enterprise-server@3.12/rest/enterprise-admin/orgs#update-an-organization-name
6565
//
6666
//meta:operation PATCH /admin/organizations/{org}
6767
func (s *AdminService) RenameOrg(ctx context.Context, org *Organization, newName string) (*RenameOrgResponse, *Response, error) {
@@ -70,7 +70,7 @@ func (s *AdminService) RenameOrg(ctx context.Context, org *Organization, newName
7070

7171
// RenameOrgByName renames an organization in GitHub Enterprise using its current name.
7272
//
73-
// GitHub API docs: https://docs.github.com/enterprise-server@3.11/rest/enterprise-admin/orgs#update-an-organization-name
73+
// GitHub API docs: https://docs.github.com/enterprise-server@3.12/rest/enterprise-admin/orgs#update-an-organization-name
7474
//
7575
//meta:operation PATCH /admin/organizations/{org}
7676
func (s *AdminService) RenameOrgByName(ctx context.Context, org, newName string) (*RenameOrgResponse, *Response, error) {

github/admin_stats.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ func (s RepoStats) String() string {
152152
// Please note that this is only available to site administrators,
153153
// otherwise it will error with a 404 not found (instead of 401 or 403).
154154
//
155-
// GitHub API docs: https://docs.github.com/enterprise-server@3.11/rest/enterprise-admin/admin-stats#get-all-statistics
155+
// GitHub API docs: https://docs.github.com/enterprise-server@3.12/rest/enterprise-admin/admin-stats#get-all-statistics
156156
//
157157
//meta:operation GET /enterprise/stats/all
158158
func (s *AdminService) GetAdminStats(ctx context.Context) (*AdminStats, *Response, error) {

github/admin_users.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ type CreateUserRequest struct {
2020

2121
// CreateUser creates a new user in GitHub Enterprise.
2222
//
23-
// GitHub API docs: https://docs.github.com/enterprise-server@3.11/rest/enterprise-admin/users#create-a-user
23+
// GitHub API docs: https://docs.github.com/enterprise-server@3.12/rest/enterprise-admin/users#create-a-user
2424
//
2525
//meta:operation POST /admin/users
2626
func (s *AdminService) CreateUser(ctx context.Context, userReq CreateUserRequest) (*User, *Response, error) {
@@ -42,7 +42,7 @@ func (s *AdminService) CreateUser(ctx context.Context, userReq CreateUserRequest
4242

4343
// DeleteUser deletes a user in GitHub Enterprise.
4444
//
45-
// GitHub API docs: https://docs.github.com/enterprise-server@3.11/rest/enterprise-admin/users#delete-a-user
45+
// GitHub API docs: https://docs.github.com/enterprise-server@3.12/rest/enterprise-admin/users#delete-a-user
4646
//
4747
//meta:operation DELETE /admin/users/{username}
4848
func (s *AdminService) DeleteUser(ctx context.Context, username string) (*Response, error) {
@@ -95,7 +95,7 @@ type UserAuthorization struct {
9595

9696
// CreateUserImpersonation creates an impersonation OAuth token.
9797
//
98-
// GitHub API docs: https://docs.github.com/enterprise-server@3.11/rest/enterprise-admin/users#create-an-impersonation-oauth-token
98+
// GitHub API docs: https://docs.github.com/enterprise-server@3.12/rest/enterprise-admin/users#create-an-impersonation-oauth-token
9999
//
100100
//meta:operation POST /admin/users/{username}/authorizations
101101
func (s *AdminService) CreateUserImpersonation(ctx context.Context, username string, opts *ImpersonateUserOptions) (*UserAuthorization, *Response, error) {
@@ -117,7 +117,7 @@ func (s *AdminService) CreateUserImpersonation(ctx context.Context, username str
117117

118118
// DeleteUserImpersonation deletes an impersonation OAuth token.
119119
//
120-
// GitHub API docs: https://docs.github.com/enterprise-server@3.11/rest/enterprise-admin/users#delete-an-impersonation-oauth-token
120+
// GitHub API docs: https://docs.github.com/enterprise-server@3.12/rest/enterprise-admin/users#delete-an-impersonation-oauth-token
121121
//
122122
//meta:operation DELETE /admin/users/{username}/authorizations
123123
func (s *AdminService) DeleteUserImpersonation(ctx context.Context, username string) (*Response, error) {

0 commit comments

Comments
 (0)