EditActionsAllowed sets the allowed actions and reusable workflows for a repository. GitHub API docs: https://docs.github.com/rest/actions/permissions?apiVersion=2022-11-28#set-allowed-actions-and-reusable-workflows-for-a-repository meta:operation PUT /repos/{owner}/{repo}/actions/permissions/sele
(ctx context.Context, org, repo string, actionsAllowed ActionsAllowed)
| 37 | // |
| 38 | //meta:operation PUT /repos/{owner}/{repo}/actions/permissions/selected-actions |
| 39 | func (s *RepositoriesService) EditActionsAllowed(ctx context.Context, org, repo string, actionsAllowed ActionsAllowed) (*ActionsAllowed, *Response, error) { |
| 40 | u := fmt.Sprintf("repos/%v/%v/actions/permissions/selected-actions", org, repo) |
| 41 | req, err := s.client.NewRequest(ctx, "PUT", u, actionsAllowed) |
| 42 | if err != nil { |
| 43 | return nil, nil, err |
| 44 | } |
| 45 | |
| 46 | var p *ActionsAllowed |
| 47 | resp, err := s.client.Do(req, &p) |
| 48 | if err != nil { |
| 49 | return nil, resp, err |
| 50 | } |
| 51 | |
| 52 | return p, resp, nil |
| 53 | } |