MCPcopy Create free account
hub / github.com/google/go-github / GetActionsAllowed

Method GetActionsAllowed

github/actions_permissions_orgs.go:208–223  ·  view source on GitHub ↗

GetActionsAllowed gets the actions that are allowed in an organization. GitHub API docs: https://docs.github.com/rest/actions/permissions?apiVersion=2022-11-28#get-allowed-actions-and-reusable-workflows-for-an-organization meta:operation GET /orgs/{org}/actions/permissions/selected-actions

(ctx context.Context, org string)

Source from the content-addressed store, hash-verified

206//
207//meta:operation GET /orgs/{org}/actions/permissions/selected-actions
208func (s *ActionsService) GetActionsAllowed(ctx context.Context, org string) (*ActionsAllowed, *Response, error) {
209 u := fmt.Sprintf("orgs/%v/actions/permissions/selected-actions", org)
210
211 req, err := s.client.NewRequest(ctx, "GET", u, nil)
212 if err != nil {
213 return nil, nil, err
214 }
215
216 var actionsAllowed *ActionsAllowed
217 resp, err := s.client.Do(req, &actionsAllowed)
218 if err != nil {
219 return nil, resp, err
220 }
221
222 return actionsAllowed, resp, nil
223}
224
225// UpdateActionsAllowed sets the actions that are allowed in an organization.
226//

Calls 2

NewRequestMethod · 0.80
DoMethod · 0.45