Skip to content

Commit c65cb55

Browse files
authored
Update openapi_operations.yaml (#3895)
1 parent 9188154 commit c65cb55

20 files changed

+1493
-1410
lines changed

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.18/rest/enterprise-admin/ldap#update-ldap-mapping-for-a-user
85+
// GitHub API docs: https://docs.github.com/enterprise-server@3.19/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.18/rest/enterprise-admin/ldap#update-ldap-mapping-for-a-team
106+
// GitHub API docs: https://docs.github.com/enterprise-server@3.19/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
@@ -23,7 +23,7 @@ type createOrgRequest struct {
2323
// Note that only a subset of the org fields are used and org must
2424
// not be nil.
2525
//
26-
// GitHub API docs: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/orgs#create-an-organization
26+
// GitHub API docs: https://docs.github.com/enterprise-server@3.19/rest/enterprise-admin/orgs#create-an-organization
2727
//
2828
//meta:operation POST /admin/organizations
2929
func (s *AdminService) CreateOrg(ctx context.Context, org *Organization, admin string) (*Organization, *Response, error) {
@@ -62,7 +62,7 @@ type RenameOrgResponse struct {
6262

6363
// RenameOrg renames an organization in GitHub Enterprise.
6464
//
65-
// GitHub API docs: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/orgs#update-an-organization-name
65+
// GitHub API docs: https://docs.github.com/enterprise-server@3.19/rest/enterprise-admin/orgs#update-an-organization-name
6666
//
6767
//meta:operation PATCH /admin/organizations/{org}
6868
func (s *AdminService) RenameOrg(ctx context.Context, org *Organization, newName string) (*RenameOrgResponse, *Response, error) {
@@ -78,7 +78,7 @@ func (s *AdminService) RenameOrg(ctx context.Context, org *Organization, newName
7878

7979
// RenameOrgByName renames an organization in GitHub Enterprise using its current name.
8080
//
81-
// GitHub API docs: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/orgs#update-an-organization-name
81+
// GitHub API docs: https://docs.github.com/enterprise-server@3.19/rest/enterprise-admin/orgs#update-an-organization-name
8282
//
8383
//meta:operation PATCH /admin/organizations/{org}
8484
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.18/rest/enterprise-admin/admin-stats#get-all-statistics
155+
// GitHub API docs: https://docs.github.com/enterprise-server@3.19/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.18/rest/enterprise-admin/users#create-a-user
23+
// GitHub API docs: https://docs.github.com/enterprise-server@3.19/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.18/rest/enterprise-admin/users#delete-a-user
45+
// GitHub API docs: https://docs.github.com/enterprise-server@3.19/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.18/rest/enterprise-admin/users#create-an-impersonation-oauth-token
98+
// GitHub API docs: https://docs.github.com/enterprise-server@3.19/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.18/rest/enterprise-admin/users#delete-an-impersonation-oauth-token
120+
// GitHub API docs: https://docs.github.com/enterprise-server@3.19/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) {

github/authorizations.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ func (s *AuthorizationsService) DeleteGrant(ctx context.Context, clientID, acces
257257
// you can e.g. create or delete a user's public SSH key. NOTE: creating a
258258
// new token automatically revokes an existing one.
259259
//
260-
// GitHub API docs: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/users#create-an-impersonation-oauth-token
260+
// GitHub API docs: https://docs.github.com/enterprise-server@3.19/rest/enterprise-admin/users#create-an-impersonation-oauth-token
261261
//
262262
//meta:operation POST /admin/users/{username}/authorizations
263263
func (s *AuthorizationsService) CreateImpersonation(ctx context.Context, username string, authReq *AuthorizationRequest) (*Authorization, *Response, error) {
@@ -279,7 +279,7 @@ func (s *AuthorizationsService) CreateImpersonation(ctx context.Context, usernam
279279
//
280280
// NOTE: there can be only one at a time.
281281
//
282-
// GitHub API docs: https://docs.github.com/enterprise-server@3.18/rest/enterprise-admin/users#delete-an-impersonation-oauth-token
282+
// GitHub API docs: https://docs.github.com/enterprise-server@3.19/rest/enterprise-admin/users#delete-an-impersonation-oauth-token
283283
//
284284
//meta:operation DELETE /admin/users/{username}/authorizations
285285
func (s *AuthorizationsService) DeleteImpersonation(ctx context.Context, username string) (*Response, error) {

github/billing.go

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,8 @@ type PremiumRequestUsageReport struct {
173173

174174
// GetOrganizationPackagesBilling returns the free and paid storage used for GitHub Packages in gigabytes for an Org.
175175
//
176-
// GitHub API docs: https://docs.github.com/rest/billing/billing#get-github-packages-billing-for-an-organization
177-
//
178-
//meta:operation GET /orgs/{org}/settings/billing/packages
176+
// This endpoint appears to have disappeared from the official GitHub v3 API documentation website.
177+
// See https://github.com/google/go-github/issues/3894 for details.
179178
func (s *BillingService) GetOrganizationPackagesBilling(ctx context.Context, org string) (*PackagesBilling, *Response, error) {
180179
u := fmt.Sprintf("orgs/%v/settings/billing/packages", org)
181180
req, err := s.client.NewRequest("GET", u, nil)
@@ -195,9 +194,8 @@ func (s *BillingService) GetOrganizationPackagesBilling(ctx context.Context, org
195194
// GetOrganizationStorageBilling returns the estimated paid and estimated total storage used for GitHub Actions
196195
// and GitHub Packages in gigabytes for an Org.
197196
//
198-
// GitHub API docs: https://docs.github.com/rest/billing/billing#get-shared-storage-billing-for-an-organization
199-
//
200-
//meta:operation GET /orgs/{org}/settings/billing/shared-storage
197+
// This endpoint appears to have disappeared from the official GitHub v3 API documentation website.
198+
// See https://github.com/google/go-github/issues/3894 for details.
201199
func (s *BillingService) GetOrganizationStorageBilling(ctx context.Context, org string) (*StorageBilling, *Response, error) {
202200
u := fmt.Sprintf("orgs/%v/settings/billing/shared-storage", org)
203201
req, err := s.client.NewRequest("GET", u, nil)
@@ -242,9 +240,8 @@ func (s *BillingService) GetOrganizationAdvancedSecurityActiveCommitters(ctx con
242240

243241
// GetPackagesBilling returns the free and paid storage used for GitHub Packages in gigabytes for a user.
244242
//
245-
// GitHub API docs: https://docs.github.com/rest/billing/billing#get-github-packages-billing-for-a-user
246-
//
247-
//meta:operation GET /users/{username}/settings/billing/packages
243+
// This endpoint appears to have disappeared from the official GitHub v3 API documentation website.
244+
// See https://github.com/google/go-github/issues/3894 for details.
248245
func (s *BillingService) GetPackagesBilling(ctx context.Context, user string) (*PackagesBilling, *Response, error) {
249246
u := fmt.Sprintf("users/%v/settings/billing/packages", user)
250247
req, err := s.client.NewRequest("GET", u, nil)
@@ -264,9 +261,8 @@ func (s *BillingService) GetPackagesBilling(ctx context.Context, user string) (*
264261
// GetStorageBilling returns the estimated paid and estimated total storage used for GitHub Actions
265262
// and GitHub Packages in gigabytes for a user.
266263
//
267-
// GitHub API docs: https://docs.github.com/rest/billing/billing#get-shared-storage-billing-for-a-user
268-
//
269-
//meta:operation GET /users/{username}/settings/billing/shared-storage
264+
// This endpoint appears to have disappeared from the official GitHub v3 API documentation website.
265+
// See https://github.com/google/go-github/issues/3894 for details.
270266
func (s *BillingService) GetStorageBilling(ctx context.Context, user string) (*StorageBilling, *Response, error) {
271267
u := fmt.Sprintf("users/%v/settings/billing/shared-storage", user)
272268
req, err := s.client.NewRequest("GET", u, nil)
@@ -287,7 +283,7 @@ func (s *BillingService) GetStorageBilling(ctx context.Context, user string) (*S
287283
//
288284
// Note: This endpoint is only available to organizations with access to the enhanced billing platform.
289285
//
290-
// GitHub API docs: https://docs.github.com/rest/billing/enhanced-billing#get-billing-usage-report-for-an-organization
286+
// GitHub API docs: https://docs.github.com/rest/billing/usage#get-billing-usage-report-for-an-organization
291287
//
292288
//meta:operation GET /organizations/{org}/settings/billing/usage
293289
func (s *BillingService) GetOrganizationUsageReport(ctx context.Context, org string, opts *UsageReportOptions) (*UsageReport, *Response, error) {
@@ -315,7 +311,7 @@ func (s *BillingService) GetOrganizationUsageReport(ctx context.Context, org str
315311
//
316312
// Note: This endpoint is only available to users with access to the enhanced billing platform.
317313
//
318-
// GitHub API docs: https://docs.github.com/rest/billing/enhanced-billing#get-billing-usage-report-for-a-user
314+
// GitHub API docs: https://docs.github.com/rest/billing/usage#get-billing-usage-report-for-a-user
319315
//
320316
//meta:operation GET /users/{username}/settings/billing/usage
321317
func (s *BillingService) GetUsageReport(ctx context.Context, user string, opts *UsageReportOptions) (*UsageReport, *Response, error) {
@@ -344,7 +340,7 @@ func (s *BillingService) GetUsageReport(ctx context.Context, user string, opts *
344340
//
345341
// Note: This endpoint is only available to organizations with access to the enhanced billing platform.
346342
//
347-
// GitHub API docs: https://docs.github.com/rest/billing/enhanced-billing#get-billing-premium-request-usage-report-for-an-organization
343+
// GitHub API docs: https://docs.github.com/rest/billing/usage#get-billing-premium-request-usage-report-for-an-organization
348344
//
349345
//meta:operation GET /organizations/{org}/settings/billing/premium_request/usage
350346
func (s *BillingService) GetOrganizationPremiumRequestUsageReport(ctx context.Context, org string, opts *PremiumRequestUsageReportOptions) (*PremiumRequestUsageReport, *Response, error) {
@@ -373,7 +369,7 @@ func (s *BillingService) GetOrganizationPremiumRequestUsageReport(ctx context.Co
373369
//
374370
// Note: This endpoint is only available to users with access to the enhanced billing platform.
375371
//
376-
// GitHub API docs: https://docs.github.com/rest/billing/enhanced-billing#get-billing-premium-request-usage-report-for-a-user
372+
// GitHub API docs: https://docs.github.com/rest/billing/usage#get-billing-premium-request-usage-report-for-a-user
377373
//
378374
//meta:operation GET /users/{username}/settings/billing/premium_request/usage
379375
func (s *BillingService) GetPremiumRequestUsageReport(ctx context.Context, user string, opts *PremiumRequestUsageReportOptions) (*PremiumRequestUsageReport, *Response, error) {

github/enterprise_billing_cost_centers.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ type DeleteCostCenterResponse struct {
7676

7777
// ListCostCenters lists all cost centers for an enterprise.
7878
//
79-
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/enterprise-admin/billing#get-all-cost-centers-for-an-enterprise
79+
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/billing/cost-centers#get-all-cost-centers-for-an-enterprise
8080
//
8181
//meta:operation GET /enterprises/{enterprise}/settings/billing/cost-centers
8282
func (s *EnterpriseService) ListCostCenters(ctx context.Context, enterprise string, opts *ListCostCenterOptions) (*CostCenters, *Response, error) {
@@ -102,7 +102,7 @@ func (s *EnterpriseService) ListCostCenters(ctx context.Context, enterprise stri
102102

103103
// CreateCostCenter creates a new cost center for an enterprise.
104104
//
105-
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/enterprise-admin/billing#create-a-new-cost-center
105+
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/billing/cost-centers#create-a-new-cost-center
106106
//
107107
//meta:operation POST /enterprises/{enterprise}/settings/billing/cost-centers
108108
func (s *EnterpriseService) CreateCostCenter(ctx context.Context, enterprise string, costCenter CostCenterRequest) (*CostCenter, *Response, error) {
@@ -124,7 +124,7 @@ func (s *EnterpriseService) CreateCostCenter(ctx context.Context, enterprise str
124124

125125
// GetCostCenter gets a cost center by ID for an enterprise.
126126
//
127-
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/enterprise-admin/billing#get-a-cost-center-by-id
127+
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/billing/cost-centers#get-a-cost-center-by-id
128128
//
129129
//meta:operation GET /enterprises/{enterprise}/settings/billing/cost-centers/{cost_center_id}
130130
func (s *EnterpriseService) GetCostCenter(ctx context.Context, enterprise, costCenterID string) (*CostCenter, *Response, error) {
@@ -146,7 +146,7 @@ func (s *EnterpriseService) GetCostCenter(ctx context.Context, enterprise, costC
146146

147147
// UpdateCostCenter updates the name of a cost center.
148148
//
149-
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/enterprise-admin/billing#update-a-cost-center-name
149+
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/billing/cost-centers#update-a-cost-center-name
150150
//
151151
//meta:operation PATCH /enterprises/{enterprise}/settings/billing/cost-centers/{cost_center_id}
152152
func (s *EnterpriseService) UpdateCostCenter(ctx context.Context, enterprise, costCenterID string, costCenter CostCenterRequest) (*CostCenter, *Response, error) {
@@ -168,7 +168,7 @@ func (s *EnterpriseService) UpdateCostCenter(ctx context.Context, enterprise, co
168168

169169
// DeleteCostCenter deletes a cost center.
170170
//
171-
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/enterprise-admin/billing#delete-a-cost-center
171+
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/billing/cost-centers#delete-a-cost-center
172172
//
173173
//meta:operation DELETE /enterprises/{enterprise}/settings/billing/cost-centers/{cost_center_id}
174174
func (s *EnterpriseService) DeleteCostCenter(ctx context.Context, enterprise, costCenterID string) (*DeleteCostCenterResponse, *Response, error) {
@@ -190,7 +190,7 @@ func (s *EnterpriseService) DeleteCostCenter(ctx context.Context, enterprise, co
190190

191191
// AddResourcesToCostCenter adds resources to a cost center.
192192
//
193-
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/enterprise-admin/billing#add-resources-to-a-cost-center
193+
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/billing/cost-centers#add-resources-to-a-cost-center
194194
//
195195
//meta:operation POST /enterprises/{enterprise}/settings/billing/cost-centers/{cost_center_id}/resource
196196
func (s *EnterpriseService) AddResourcesToCostCenter(ctx context.Context, enterprise, costCenterID string, resources CostCenterResourceRequest) (*AddResourcesToCostCenterResponse, *Response, error) {
@@ -212,7 +212,7 @@ func (s *EnterpriseService) AddResourcesToCostCenter(ctx context.Context, enterp
212212

213213
// RemoveResourcesFromCostCenter removes resources from a cost center.
214214
//
215-
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/enterprise-admin/billing#remove-resources-from-a-cost-center
215+
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/billing/cost-centers#remove-resources-from-a-cost-center
216216
//
217217
//meta:operation DELETE /enterprises/{enterprise}/settings/billing/cost-centers/{cost_center_id}/resource
218218
func (s *EnterpriseService) RemoveResourcesFromCostCenter(ctx context.Context, enterprise, costCenterID string, resources CostCenterResourceRequest) (*RemoveResourcesFromCostCenterResponse, *Response, error) {

github/enterprise_licenses.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ type LastLicenseSyncProperties struct {
9191

9292
// GetConsumedLicenses collect information about the number of consumed licenses and a collection with all the users with consumed enterprise licenses.
9393
//
94-
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/enterprise-admin/license#list-enterprise-consumed-licenses
94+
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/enterprise-admin/licensing#list-enterprise-consumed-licenses
9595
//
9696
//meta:operation GET /enterprises/{enterprise}/consumed-licenses
9797
func (s *EnterpriseService) GetConsumedLicenses(ctx context.Context, enterprise string, opts *ListOptions) (*EnterpriseConsumedLicenses, *Response, error) {
@@ -117,7 +117,7 @@ func (s *EnterpriseService) GetConsumedLicenses(ctx context.Context, enterprise
117117

118118
// GetLicenseSyncStatus collects information about the status of a license sync job for an enterprise.
119119
//
120-
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/enterprise-admin/license#get-a-license-sync-status
120+
// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/enterprise-admin/licensing#get-a-license-sync-status
121121
//
122122
//meta:operation GET /enterprises/{enterprise}/license-sync-status
123123
func (s *EnterpriseService) GetLicenseSyncStatus(ctx context.Context, enterprise string) (*EnterpriseLicenseSyncStatus, *Response, error) {

0 commit comments

Comments
 (0)