Debian Codegraph @

github/orgs_actions_allowed.go

raw
1 // Copyright 2021 The go-github AUTHORS. All rights reserved.
2 //
3 // Use of this source code is governed by a BSD-style
4 // license that can be found in the LICENSE file.
5
6 package github
7
8 import (
9 "context"
10 )
11
12 // GetActionsAllowed gets the actions that are allowed in an organization.
13 //
14 // Deprecated: please use `client.Actions.GetActionsAllowed` instead.
15 //
16 // GitHub API docs: https://docs.github.com/rest/actions/permissions#get-allowed-actions-and-reusable-workflows-for-an-organization
17 //
18 //meta:operation GET /orgs/{org}/actions/permissions/selected-actions
19 func (s *OrganizationsService) GetActionsAllowed(ctx context.Context, org string) (*ActionsAllowed, *Response, error) {
20 s2 := (*ActionsService)(s)
21 return s2.GetActionsAllowed(ctx, org)
22 }
23
24 // EditActionsAllowed sets the actions that are allowed in an organization.
25 //
26 // Deprecated: please use `client.Actions.EditActionsAllowed` instead.
27 //
28 // GitHub API docs: https://docs.github.com/rest/actions/permissions#set-allowed-actions-and-reusable-workflows-for-an-organization
29 //
30 //meta:operation PUT /orgs/{org}/actions/permissions/selected-actions
31 func (s *OrganizationsService) EditActionsAllowed(ctx context.Context, org string, actionsAllowed ActionsAllowed) (*ActionsAllowed, *Response, error) {
32 s2 := (*ActionsService)(s)
33 return s2.EditActionsAllowed(ctx, org, actionsAllowed)
34 }