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