MCPcopy Create free account
hub / github.com/auth0/auth0-cli / unDeployedActionPickerOptions

Method unDeployedActionPickerOptions

internal/cli/actions.go:631–649  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

629}
630
631func (c *cli) unDeployedActionPickerOptions(ctx context.Context) (pickerOptions, error) {
632 list, err := c.api.Action.List(ctx, management.Parameter("deployed", "false"))
633 if err != nil {
634 return nil, fmt.Errorf("failed to list actions: %w", err)
635 }
636
637 var opts pickerOptions
638 for _, r := range list.Actions {
639 label := fmt.Sprintf("%s %s", r.GetName(), ansi.Faint("("+r.GetID()+")"))
640
641 opts = append(opts, pickerOption{value: r.GetID(), label: label})
642 }
643
644 if len(opts) == 0 {
645 return nil, errors.New("there are currently no actions to deploy")
646 }
647
648 return opts, nil
649}
650
651func (c *cli) actionEditorHint() {
652 c.renderer.Infof("%s Once you close the editor, the action will be saved. To cancel, press CTRL+C.", ansi.Faint("Hint:"))

Callers 1

Calls 4

FaintFunction · 0.92
ErrorfMethod · 0.80
ListMethod · 0.65
GetNameMethod · 0.65

Tested by 1