(cli *cli)
| 497 | } |
| 498 | |
| 499 | func openActionCmd(cli *cli) *cobra.Command { |
| 500 | var inputs struct { |
| 501 | ID string |
| 502 | } |
| 503 | |
| 504 | cmd := &cobra.Command{ |
| 505 | Use: "open", |
| 506 | Args: cobra.MaximumNArgs(1), |
| 507 | Short: "Open the settings page of an action", |
| 508 | Long: "Open an action's settings page in the Auth0 Dashboard.", |
| 509 | Example: ` auth0 actions open |
| 510 | auth0 actions open <action-id>`, |
| 511 | RunE: func(cmd *cobra.Command, args []string) error { |
| 512 | if len(args) == 0 { |
| 513 | if err := actionID.Pick(cmd, &inputs.ID, cli.actionPickerOptions); err != nil { |
| 514 | return err |
| 515 | } |
| 516 | } else { |
| 517 | inputs.ID = args[0] |
| 518 | } |
| 519 | |
| 520 | openManageURL(cli, cli.Config.DefaultTenant, formatActionDetailsPath(url.PathEscape(inputs.ID))) |
| 521 | |
| 522 | return nil |
| 523 | }, |
| 524 | } |
| 525 | |
| 526 | return cmd |
| 527 | } |
| 528 | |
| 529 | func diffActionCmd(cli *cli) *cobra.Command { |
| 530 | var inputs struct { |
no test coverage detected