diff --git a/github/actions_permissions_orgs.go b/github/actions_permissions_orgs.go index 5684aa233bc..bbbdc6df3b7 100644 --- a/github/actions_permissions_orgs.go +++ b/github/actions_permissions_orgs.go @@ -274,9 +274,9 @@ func (s *ActionsService) EditDefaultWorkflowPermissionsInOrganization(ctx contex // // GitHub API docs: https://docs.github.com/rest/actions/permissions#get-artifact-and-log-retention-settings-for-an-organization // -//meta:operation GET /organizations/{org}/actions/permissions/artifact-and-log-retention +//meta:operation GET /orgs/{org}/actions/permissions/artifact-and-log-retention func (s *ActionsService) GetArtifactAndLogRetentionPeriodInOrganization(ctx context.Context, org string) (*ArtifactPeriod, *Response, error) { - u := fmt.Sprintf("organizations/%v/actions/permissions/artifact-and-log-retention", org) + u := fmt.Sprintf("orgs/%v/actions/permissions/artifact-and-log-retention", org) req, err := s.client.NewRequest("GET", u, nil) if err != nil { @@ -296,9 +296,9 @@ func (s *ActionsService) GetArtifactAndLogRetentionPeriodInOrganization(ctx cont // // GitHub API docs: https://docs.github.com/rest/actions/permissions#set-artifact-and-log-retention-settings-for-an-organization // -//meta:operation PUT /organizations/{org}/actions/permissions/artifact-and-log-retention +//meta:operation PUT /orgs/{org}/actions/permissions/artifact-and-log-retention func (s *ActionsService) EditArtifactAndLogRetentionPeriodInOrganization(ctx context.Context, org string, period ArtifactPeriodOpt) (*Response, error) { - u := fmt.Sprintf("organizations/%v/actions/permissions/artifact-and-log-retention", org) + u := fmt.Sprintf("orgs/%v/actions/permissions/artifact-and-log-retention", org) req, err := s.client.NewRequest("PUT", u, period) if err != nil { return nil, err diff --git a/github/actions_permissions_orgs_test.go b/github/actions_permissions_orgs_test.go index 3f424978b71..6bf3fe3f89b 100644 --- a/github/actions_permissions_orgs_test.go +++ b/github/actions_permissions_orgs_test.go @@ -420,7 +420,7 @@ func TestActionsService_GetArtifactAndLogRetentionPeriodInOrganization(t *testin t.Parallel() client, mux, _ := setup(t) - mux.HandleFunc("/organizations/o/actions/permissions/artifact-and-log-retention", func(w http.ResponseWriter, r *http.Request) { + mux.HandleFunc("/orgs/o/actions/permissions/artifact-and-log-retention", func(w http.ResponseWriter, r *http.Request) { testMethod(t, r, "GET") fmt.Fprint(w, `{"days": 90, "maximum_allowed_days": 365}`) }) @@ -460,7 +460,7 @@ func TestActionsService_EditArtifactAndLogRetentionPeriodInOrganization(t *testi input := &ArtifactPeriodOpt{Days: Ptr(90)} - mux.HandleFunc("/organizations/o/actions/permissions/artifact-and-log-retention", func(w http.ResponseWriter, r *http.Request) { + mux.HandleFunc("/orgs/o/actions/permissions/artifact-and-log-retention", func(w http.ResponseWriter, r *http.Request) { v := new(ArtifactPeriodOpt) assertNilError(t, json.NewDecoder(r.Body).Decode(v)) diff --git a/openapi_operations.yaml b/openapi_operations.yaml index 0a58a1d10da..d817be5af5a 100644 --- a/openapi_operations.yaml +++ b/openapi_operations.yaml @@ -27,7 +27,7 @@ operation_overrides: documentation_url: https://docs.github.com/rest/pages/pages#request-a-github-pages-build - name: GET /repos/{owner}/{repo}/pages/builds/{build_id} documentation_url: https://docs.github.com/rest/pages/pages#get-github-pages-build -openapi_commit: 7187214c51f81537dd0b72ccc8c1af762d73f2c6 +openapi_commit: 30ab35c5db4a05519ceed2e41292cdb7af182f1c openapi_operations: - name: GET / documentation_url: https://docs.github.com/rest/meta/meta#github-api-root @@ -1429,66 +1429,6 @@ openapi_operations: openapi_files: - descriptions/ghec/ghec.json - descriptions/ghes-3.17/ghes-3.17.json - - name: GET /organizations/{org}/actions/permissions/artifact-and-log-retention - documentation_url: https://docs.github.com/rest/actions/permissions#get-artifact-and-log-retention-settings-for-an-organization - openapi_files: - - descriptions/api.github.com/api.github.com.json - - descriptions/ghec/ghec.json - - name: PUT /organizations/{org}/actions/permissions/artifact-and-log-retention - documentation_url: https://docs.github.com/rest/actions/permissions#set-artifact-and-log-retention-settings-for-an-organization - openapi_files: - - descriptions/api.github.com/api.github.com.json - - descriptions/ghec/ghec.json - - name: GET /organizations/{org}/actions/permissions/fork-pr-contributor-approval - documentation_url: https://docs.github.com/rest/actions/permissions#get-fork-pr-contributor-approval-permissions-for-an-organization - openapi_files: - - descriptions/api.github.com/api.github.com.json - - descriptions/ghec/ghec.json - - name: PUT /organizations/{org}/actions/permissions/fork-pr-contributor-approval - documentation_url: https://docs.github.com/rest/actions/permissions#set-fork-pr-contributor-approval-permissions-for-an-organization - openapi_files: - - descriptions/api.github.com/api.github.com.json - - descriptions/ghec/ghec.json - - name: GET /organizations/{org}/actions/permissions/fork-pr-workflows-private-repos - documentation_url: https://docs.github.com/rest/actions/permissions#get-private-repo-fork-pr-workflow-settings-for-an-organization - openapi_files: - - descriptions/api.github.com/api.github.com.json - - descriptions/ghec/ghec.json - - name: PUT /organizations/{org}/actions/permissions/fork-pr-workflows-private-repos - documentation_url: https://docs.github.com/rest/actions/permissions#set-private-repo-fork-pr-workflow-settings-for-an-organization - openapi_files: - - descriptions/api.github.com/api.github.com.json - - descriptions/ghec/ghec.json - - name: GET /organizations/{org}/actions/permissions/self-hosted-runners - documentation_url: https://docs.github.com/rest/actions/permissions#get-self-hosted-runners-settings-for-an-organization - openapi_files: - - descriptions/api.github.com/api.github.com.json - - descriptions/ghec/ghec.json - - name: PUT /organizations/{org}/actions/permissions/self-hosted-runners - documentation_url: https://docs.github.com/rest/actions/permissions#set-self-hosted-runners-settings-for-an-organization - openapi_files: - - descriptions/api.github.com/api.github.com.json - - descriptions/ghec/ghec.json - - name: GET /organizations/{org}/actions/permissions/self-hosted-runners/repositories - documentation_url: https://docs.github.com/rest/actions/permissions#list-repositories-allowed-to-use-self-hosted-runners-in-an-organization - openapi_files: - - descriptions/api.github.com/api.github.com.json - - descriptions/ghec/ghec.json - - name: PUT /organizations/{org}/actions/permissions/self-hosted-runners/repositories - documentation_url: https://docs.github.com/rest/actions/permissions#set-repositories-allowed-to-use-self-hosted-runners-in-an-organization - openapi_files: - - descriptions/api.github.com/api.github.com.json - - descriptions/ghec/ghec.json - - name: DELETE /organizations/{org}/actions/permissions/self-hosted-runners/repositories/{repository_id} - 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 - openapi_files: - - descriptions/api.github.com/api.github.com.json - - descriptions/ghec/ghec.json - - name: PUT /organizations/{org}/actions/permissions/self-hosted-runners/repositories/{repository_id} - 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 - openapi_files: - - descriptions/api.github.com/api.github.com.json - - descriptions/ghec/ghec.json - name: GET /organizations/{org}/dependabot/repository-access documentation_url: https://docs.github.com/rest/dependabot/repository-access#lists-the-repositories-dependabot-can-access-in-an-organization openapi_files: @@ -1613,6 +1553,36 @@ openapi_operations: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - descriptions/ghes-3.17/ghes-3.17.json + - name: GET /orgs/{org}/actions/permissions/artifact-and-log-retention + documentation_url: https://docs.github.com/rest/actions/permissions#get-artifact-and-log-retention-settings-for-an-organization + openapi_files: + - descriptions/api.github.com/api.github.com.json + - descriptions/ghec/ghec.json + - name: PUT /orgs/{org}/actions/permissions/artifact-and-log-retention + documentation_url: https://docs.github.com/rest/actions/permissions#set-artifact-and-log-retention-settings-for-an-organization + openapi_files: + - descriptions/api.github.com/api.github.com.json + - descriptions/ghec/ghec.json + - name: GET /orgs/{org}/actions/permissions/fork-pr-contributor-approval + documentation_url: https://docs.github.com/rest/actions/permissions#get-fork-pr-contributor-approval-permissions-for-an-organization + openapi_files: + - descriptions/api.github.com/api.github.com.json + - descriptions/ghec/ghec.json + - name: PUT /orgs/{org}/actions/permissions/fork-pr-contributor-approval + documentation_url: https://docs.github.com/rest/actions/permissions#set-fork-pr-contributor-approval-permissions-for-an-organization + openapi_files: + - descriptions/api.github.com/api.github.com.json + - descriptions/ghec/ghec.json + - name: GET /orgs/{org}/actions/permissions/fork-pr-workflows-private-repos + documentation_url: https://docs.github.com/rest/actions/permissions#get-private-repo-fork-pr-workflow-settings-for-an-organization + openapi_files: + - descriptions/api.github.com/api.github.com.json + - descriptions/ghec/ghec.json + - name: PUT /orgs/{org}/actions/permissions/fork-pr-workflows-private-repos + documentation_url: https://docs.github.com/rest/actions/permissions#set-private-repo-fork-pr-workflow-settings-for-an-organization + openapi_files: + - descriptions/api.github.com/api.github.com.json + - descriptions/ghec/ghec.json - name: GET /orgs/{org}/actions/permissions/repositories documentation_url: https://docs.github.com/rest/actions/permissions#list-selected-repositories-enabled-for-github-actions-in-an-organization openapi_files: @@ -1649,6 +1619,36 @@ openapi_operations: - descriptions/api.github.com/api.github.com.json - descriptions/ghec/ghec.json - descriptions/ghes-3.17/ghes-3.17.json + - name: GET /orgs/{org}/actions/permissions/self-hosted-runners + documentation_url: https://docs.github.com/rest/actions/permissions#get-self-hosted-runners-settings-for-an-organization + openapi_files: + - descriptions/api.github.com/api.github.com.json + - descriptions/ghec/ghec.json + - name: PUT /orgs/{org}/actions/permissions/self-hosted-runners + documentation_url: https://docs.github.com/rest/actions/permissions#set-self-hosted-runners-settings-for-an-organization + openapi_files: + - descriptions/api.github.com/api.github.com.json + - descriptions/ghec/ghec.json + - name: GET /orgs/{org}/actions/permissions/self-hosted-runners/repositories + documentation_url: https://docs.github.com/rest/actions/permissions#list-repositories-allowed-to-use-self-hosted-runners-in-an-organization + openapi_files: + - descriptions/api.github.com/api.github.com.json + - descriptions/ghec/ghec.json + - name: PUT /orgs/{org}/actions/permissions/self-hosted-runners/repositories + documentation_url: https://docs.github.com/rest/actions/permissions#set-repositories-allowed-to-use-self-hosted-runners-in-an-organization + openapi_files: + - descriptions/api.github.com/api.github.com.json + - descriptions/ghec/ghec.json + - name: DELETE /orgs/{org}/actions/permissions/self-hosted-runners/repositories/{repository_id} + 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 + openapi_files: + - descriptions/api.github.com/api.github.com.json + - descriptions/ghec/ghec.json + - name: PUT /orgs/{org}/actions/permissions/self-hosted-runners/repositories/{repository_id} + 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 + openapi_files: + - descriptions/api.github.com/api.github.com.json + - descriptions/ghec/ghec.json - name: GET /orgs/{org}/actions/permissions/workflow documentation_url: https://docs.github.com/rest/actions/permissions#get-default-workflow-permissions-for-an-organization openapi_files: