Skip to content

Commit 0d45310

Browse files
authored
fix: Replace 'organizations' with 'orgs' in API endpoints (#3673)
1 parent c17b3ee commit 0d45310

File tree

3 files changed

+67
-67
lines changed

3 files changed

+67
-67
lines changed

github/actions_permissions_orgs.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -274,9 +274,9 @@ func (s *ActionsService) EditDefaultWorkflowPermissionsInOrganization(ctx contex
274274
//
275275
// GitHub API docs: https://docs.github.com/rest/actions/permissions#get-artifact-and-log-retention-settings-for-an-organization
276276
//
277-
//meta:operation GET /organizations/{org}/actions/permissions/artifact-and-log-retention
277+
//meta:operation GET /orgs/{org}/actions/permissions/artifact-and-log-retention
278278
func (s *ActionsService) GetArtifactAndLogRetentionPeriodInOrganization(ctx context.Context, org string) (*ArtifactPeriod, *Response, error) {
279-
u := fmt.Sprintf("organizations/%v/actions/permissions/artifact-and-log-retention", org)
279+
u := fmt.Sprintf("orgs/%v/actions/permissions/artifact-and-log-retention", org)
280280

281281
req, err := s.client.NewRequest("GET", u, nil)
282282
if err != nil {
@@ -296,9 +296,9 @@ func (s *ActionsService) GetArtifactAndLogRetentionPeriodInOrganization(ctx cont
296296
//
297297
// GitHub API docs: https://docs.github.com/rest/actions/permissions#set-artifact-and-log-retention-settings-for-an-organization
298298
//
299-
//meta:operation PUT /organizations/{org}/actions/permissions/artifact-and-log-retention
299+
//meta:operation PUT /orgs/{org}/actions/permissions/artifact-and-log-retention
300300
func (s *ActionsService) EditArtifactAndLogRetentionPeriodInOrganization(ctx context.Context, org string, period ArtifactPeriodOpt) (*Response, error) {
301-
u := fmt.Sprintf("organizations/%v/actions/permissions/artifact-and-log-retention", org)
301+
u := fmt.Sprintf("orgs/%v/actions/permissions/artifact-and-log-retention", org)
302302
req, err := s.client.NewRequest("PUT", u, period)
303303
if err != nil {
304304
return nil, err

github/actions_permissions_orgs_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ func TestActionsService_GetArtifactAndLogRetentionPeriodInOrganization(t *testin
420420
t.Parallel()
421421
client, mux, _ := setup(t)
422422

423-
mux.HandleFunc("/organizations/o/actions/permissions/artifact-and-log-retention", func(w http.ResponseWriter, r *http.Request) {
423+
mux.HandleFunc("/orgs/o/actions/permissions/artifact-and-log-retention", func(w http.ResponseWriter, r *http.Request) {
424424
testMethod(t, r, "GET")
425425
fmt.Fprint(w, `{"days": 90, "maximum_allowed_days": 365}`)
426426
})
@@ -460,7 +460,7 @@ func TestActionsService_EditArtifactAndLogRetentionPeriodInOrganization(t *testi
460460

461461
input := &ArtifactPeriodOpt{Days: Ptr(90)}
462462

463-
mux.HandleFunc("/organizations/o/actions/permissions/artifact-and-log-retention", func(w http.ResponseWriter, r *http.Request) {
463+
mux.HandleFunc("/orgs/o/actions/permissions/artifact-and-log-retention", func(w http.ResponseWriter, r *http.Request) {
464464
v := new(ArtifactPeriodOpt)
465465
assertNilError(t, json.NewDecoder(r.Body).Decode(v))
466466

openapi_operations.yaml

Lines changed: 61 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ operation_overrides:
2727
documentation_url: https://docs.github.com/rest/pages/pages#request-a-github-pages-build
2828
- name: GET /repos/{owner}/{repo}/pages/builds/{build_id}
2929
documentation_url: https://docs.github.com/rest/pages/pages#get-github-pages-build
30-
openapi_commit: 7187214c51f81537dd0b72ccc8c1af762d73f2c6
30+
openapi_commit: 30ab35c5db4a05519ceed2e41292cdb7af182f1c
3131
openapi_operations:
3232
- name: GET /
3333
documentation_url: https://docs.github.com/rest/meta/meta#github-api-root
@@ -1429,66 +1429,6 @@ openapi_operations:
14291429
openapi_files:
14301430
- descriptions/ghec/ghec.json
14311431
- descriptions/ghes-3.17/ghes-3.17.json
1432-
- name: GET /organizations/{org}/actions/permissions/artifact-and-log-retention
1433-
documentation_url: https://docs.github.com/rest/actions/permissions#get-artifact-and-log-retention-settings-for-an-organization
1434-
openapi_files:
1435-
- descriptions/api.github.com/api.github.com.json
1436-
- descriptions/ghec/ghec.json
1437-
- name: PUT /organizations/{org}/actions/permissions/artifact-and-log-retention
1438-
documentation_url: https://docs.github.com/rest/actions/permissions#set-artifact-and-log-retention-settings-for-an-organization
1439-
openapi_files:
1440-
- descriptions/api.github.com/api.github.com.json
1441-
- descriptions/ghec/ghec.json
1442-
- name: GET /organizations/{org}/actions/permissions/fork-pr-contributor-approval
1443-
documentation_url: https://docs.github.com/rest/actions/permissions#get-fork-pr-contributor-approval-permissions-for-an-organization
1444-
openapi_files:
1445-
- descriptions/api.github.com/api.github.com.json
1446-
- descriptions/ghec/ghec.json
1447-
- name: PUT /organizations/{org}/actions/permissions/fork-pr-contributor-approval
1448-
documentation_url: https://docs.github.com/rest/actions/permissions#set-fork-pr-contributor-approval-permissions-for-an-organization
1449-
openapi_files:
1450-
- descriptions/api.github.com/api.github.com.json
1451-
- descriptions/ghec/ghec.json
1452-
- name: GET /organizations/{org}/actions/permissions/fork-pr-workflows-private-repos
1453-
documentation_url: https://docs.github.com/rest/actions/permissions#get-private-repo-fork-pr-workflow-settings-for-an-organization
1454-
openapi_files:
1455-
- descriptions/api.github.com/api.github.com.json
1456-
- descriptions/ghec/ghec.json
1457-
- name: PUT /organizations/{org}/actions/permissions/fork-pr-workflows-private-repos
1458-
documentation_url: https://docs.github.com/rest/actions/permissions#set-private-repo-fork-pr-workflow-settings-for-an-organization
1459-
openapi_files:
1460-
- descriptions/api.github.com/api.github.com.json
1461-
- descriptions/ghec/ghec.json
1462-
- name: GET /organizations/{org}/actions/permissions/self-hosted-runners
1463-
documentation_url: https://docs.github.com/rest/actions/permissions#get-self-hosted-runners-settings-for-an-organization
1464-
openapi_files:
1465-
- descriptions/api.github.com/api.github.com.json
1466-
- descriptions/ghec/ghec.json
1467-
- name: PUT /organizations/{org}/actions/permissions/self-hosted-runners
1468-
documentation_url: https://docs.github.com/rest/actions/permissions#set-self-hosted-runners-settings-for-an-organization
1469-
openapi_files:
1470-
- descriptions/api.github.com/api.github.com.json
1471-
- descriptions/ghec/ghec.json
1472-
- name: GET /organizations/{org}/actions/permissions/self-hosted-runners/repositories
1473-
documentation_url: https://docs.github.com/rest/actions/permissions#list-repositories-allowed-to-use-self-hosted-runners-in-an-organization
1474-
openapi_files:
1475-
- descriptions/api.github.com/api.github.com.json
1476-
- descriptions/ghec/ghec.json
1477-
- name: PUT /organizations/{org}/actions/permissions/self-hosted-runners/repositories
1478-
documentation_url: https://docs.github.com/rest/actions/permissions#set-repositories-allowed-to-use-self-hosted-runners-in-an-organization
1479-
openapi_files:
1480-
- descriptions/api.github.com/api.github.com.json
1481-
- descriptions/ghec/ghec.json
1482-
- name: DELETE /organizations/{org}/actions/permissions/self-hosted-runners/repositories/{repository_id}
1483-
documentation_url: https://docs.github.com/rest/actions/permissions#remove-a-repository-from-the-list-of-repositories-allowed-to-use-self-hosted-runners-in-an-organization
1484-
openapi_files:
1485-
- descriptions/api.github.com/api.github.com.json
1486-
- descriptions/ghec/ghec.json
1487-
- name: PUT /organizations/{org}/actions/permissions/self-hosted-runners/repositories/{repository_id}
1488-
documentation_url: https://docs.github.com/rest/actions/permissions#add-a-repository-to-the-list-of-repositories-allowed-to-use-self-hosted-runners-in-an-organization
1489-
openapi_files:
1490-
- descriptions/api.github.com/api.github.com.json
1491-
- descriptions/ghec/ghec.json
14921432
- name: GET /organizations/{org}/dependabot/repository-access
14931433
documentation_url: https://docs.github.com/rest/dependabot/repository-access#lists-the-repositories-dependabot-can-access-in-an-organization
14941434
openapi_files:
@@ -1613,6 +1553,36 @@ openapi_operations:
16131553
- descriptions/api.github.com/api.github.com.json
16141554
- descriptions/ghec/ghec.json
16151555
- descriptions/ghes-3.17/ghes-3.17.json
1556+
- name: GET /orgs/{org}/actions/permissions/artifact-and-log-retention
1557+
documentation_url: https://docs.github.com/rest/actions/permissions#get-artifact-and-log-retention-settings-for-an-organization
1558+
openapi_files:
1559+
- descriptions/api.github.com/api.github.com.json
1560+
- descriptions/ghec/ghec.json
1561+
- name: PUT /orgs/{org}/actions/permissions/artifact-and-log-retention
1562+
documentation_url: https://docs.github.com/rest/actions/permissions#set-artifact-and-log-retention-settings-for-an-organization
1563+
openapi_files:
1564+
- descriptions/api.github.com/api.github.com.json
1565+
- descriptions/ghec/ghec.json
1566+
- name: GET /orgs/{org}/actions/permissions/fork-pr-contributor-approval
1567+
documentation_url: https://docs.github.com/rest/actions/permissions#get-fork-pr-contributor-approval-permissions-for-an-organization
1568+
openapi_files:
1569+
- descriptions/api.github.com/api.github.com.json
1570+
- descriptions/ghec/ghec.json
1571+
- name: PUT /orgs/{org}/actions/permissions/fork-pr-contributor-approval
1572+
documentation_url: https://docs.github.com/rest/actions/permissions#set-fork-pr-contributor-approval-permissions-for-an-organization
1573+
openapi_files:
1574+
- descriptions/api.github.com/api.github.com.json
1575+
- descriptions/ghec/ghec.json
1576+
- name: GET /orgs/{org}/actions/permissions/fork-pr-workflows-private-repos
1577+
documentation_url: https://docs.github.com/rest/actions/permissions#get-private-repo-fork-pr-workflow-settings-for-an-organization
1578+
openapi_files:
1579+
- descriptions/api.github.com/api.github.com.json
1580+
- descriptions/ghec/ghec.json
1581+
- name: PUT /orgs/{org}/actions/permissions/fork-pr-workflows-private-repos
1582+
documentation_url: https://docs.github.com/rest/actions/permissions#set-private-repo-fork-pr-workflow-settings-for-an-organization
1583+
openapi_files:
1584+
- descriptions/api.github.com/api.github.com.json
1585+
- descriptions/ghec/ghec.json
16161586
- name: GET /orgs/{org}/actions/permissions/repositories
16171587
documentation_url: https://docs.github.com/rest/actions/permissions#list-selected-repositories-enabled-for-github-actions-in-an-organization
16181588
openapi_files:
@@ -1649,6 +1619,36 @@ openapi_operations:
16491619
- descriptions/api.github.com/api.github.com.json
16501620
- descriptions/ghec/ghec.json
16511621
- descriptions/ghes-3.17/ghes-3.17.json
1622+
- name: GET /orgs/{org}/actions/permissions/self-hosted-runners
1623+
documentation_url: https://docs.github.com/rest/actions/permissions#get-self-hosted-runners-settings-for-an-organization
1624+
openapi_files:
1625+
- descriptions/api.github.com/api.github.com.json
1626+
- descriptions/ghec/ghec.json
1627+
- name: PUT /orgs/{org}/actions/permissions/self-hosted-runners
1628+
documentation_url: https://docs.github.com/rest/actions/permissions#set-self-hosted-runners-settings-for-an-organization
1629+
openapi_files:
1630+
- descriptions/api.github.com/api.github.com.json
1631+
- descriptions/ghec/ghec.json
1632+
- name: GET /orgs/{org}/actions/permissions/self-hosted-runners/repositories
1633+
documentation_url: https://docs.github.com/rest/actions/permissions#list-repositories-allowed-to-use-self-hosted-runners-in-an-organization
1634+
openapi_files:
1635+
- descriptions/api.github.com/api.github.com.json
1636+
- descriptions/ghec/ghec.json
1637+
- name: PUT /orgs/{org}/actions/permissions/self-hosted-runners/repositories
1638+
documentation_url: https://docs.github.com/rest/actions/permissions#set-repositories-allowed-to-use-self-hosted-runners-in-an-organization
1639+
openapi_files:
1640+
- descriptions/api.github.com/api.github.com.json
1641+
- descriptions/ghec/ghec.json
1642+
- name: DELETE /orgs/{org}/actions/permissions/self-hosted-runners/repositories/{repository_id}
1643+
documentation_url: https://docs.github.com/rest/actions/permissions#remove-a-repository-from-the-list-of-repositories-allowed-to-use-self-hosted-runners-in-an-organization
1644+
openapi_files:
1645+
- descriptions/api.github.com/api.github.com.json
1646+
- descriptions/ghec/ghec.json
1647+
- name: PUT /orgs/{org}/actions/permissions/self-hosted-runners/repositories/{repository_id}
1648+
documentation_url: https://docs.github.com/rest/actions/permissions#add-a-repository-to-the-list-of-repositories-allowed-to-use-self-hosted-runners-in-an-organization
1649+
openapi_files:
1650+
- descriptions/api.github.com/api.github.com.json
1651+
- descriptions/ghec/ghec.json
16521652
- name: GET /orgs/{org}/actions/permissions/workflow
16531653
documentation_url: https://docs.github.com/rest/actions/permissions#get-default-workflow-permissions-for-an-organization
16541654
openapi_files:

0 commit comments

Comments
 (0)