Skip to content

Commit

Permalink
fix: rename list organization-administrator command to match others (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
shreddedbacon authored Aug 6, 2024
1 parent ec3148d commit 29f002e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions cmd/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -1151,9 +1151,9 @@ var ListOrganizationUsersCmd = &cobra.Command{
},
}

var ListOrganizationAdminsCmd = &cobra.Command{
Use: "organization-admins",
Aliases: []string{"org-a"},
var listOrganizationAdminsCmd = &cobra.Command{
Use: "organization-admininstrators",
Aliases: []string{"organization-admins", "org-admins", "org-a"},
Short: "List admins in an organization",
PreRunE: func(_ *cobra.Command, _ []string) error {
return validateTokenE(cmdLagoon)
Expand Down Expand Up @@ -1285,7 +1285,7 @@ func init() {
listCmd.AddCommand(listUsersGroupsCmd)
listCmd.AddCommand(listOrganizationProjectsCmd)
listCmd.AddCommand(ListOrganizationUsersCmd)
listCmd.AddCommand(ListOrganizationAdminsCmd)
listCmd.AddCommand(listOrganizationAdminsCmd)
listCmd.AddCommand(listOrganizationGroupsCmd)
listCmd.AddCommand(listOrganizationDeployTargetsCmd)
listCmd.AddCommand(listOrganizationsCmd)
Expand All @@ -1298,7 +1298,7 @@ func init() {
listVariablesCmd.Flags().BoolP("reveal", "", false, "Reveal the variable values")
listOrganizationProjectsCmd.Flags().StringP("organization-name", "O", "", "Name of the organization to list associated projects for")
ListOrganizationUsersCmd.Flags().StringP("organization-name", "O", "", "Name of the organization to list associated users for")
ListOrganizationAdminsCmd.Flags().StringP("organization-name", "O", "", "Name of the organization to list associated users for")
listOrganizationAdminsCmd.Flags().StringP("organization-name", "O", "", "Name of the organization to list associated users for")
listOrganizationGroupsCmd.Flags().StringP("organization-name", "O", "", "Name of the organization to list associated groups for")
listOrganizationDeployTargetsCmd.Flags().StringP("organization-name", "O", "", "Name of the organization to list associated deploy targets for")
listOrganizationDeployTargetsCmd.Flags().Uint("id", 0, "ID of the organization to list associated deploy targets for")
Expand Down
4 changes: 2 additions & 2 deletions cmd/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ var getAllUserKeysCmd = &cobra.Command{

var addAdministratorToOrganizationCmd = &cobra.Command{
Use: "organization-administrator",
Aliases: []string{"org-admin"},
Aliases: []string{"organization-admin", "org-admin", "org-a"},
Short: "Add an administrator to an Organization",
Long: "Add an administrator to an Organization. If the role flag is not provided users will be added as viewers",
PreRunE: func(_ *cobra.Command, _ []string) error {
Expand Down Expand Up @@ -585,7 +585,7 @@ var addAdministratorToOrganizationCmd = &cobra.Command{

var removeAdministratorFromOrganizationCmd = &cobra.Command{
Use: "organization-administrator",
Aliases: []string{"org-admin"},
Aliases: []string{"organization-admin", "org-admin", "org-a"},
Short: "Remove an administrator from an Organization",
PreRunE: func(_ *cobra.Command, _ []string) error {
return validateTokenE(lagoonCLIConfig.Current)
Expand Down
2 changes: 1 addition & 1 deletion docs/commands/lagoon_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ List projects, environments, deployments, variables or notifications
* [lagoon list groups](lagoon_list_groups.md) - List groups you have access to (alias: g)
* [lagoon list invokable-tasks](lagoon_list_invokable-tasks.md) - Print a list of invokable tasks
* [lagoon list notification](lagoon_list_notification.md) - List all notifications or notifications on projects
* [lagoon list organization-admins](lagoon_list_organization-admins.md) - List admins in an organization
* [lagoon list organization-admininstrators](lagoon_list_organization-admininstrators.md) - List admins in an organization
* [lagoon list organization-deploytargets](lagoon_list_organization-deploytargets.md) - List deploy targets in an organization
* [lagoon list organization-groups](lagoon_list_organization-groups.md) - List groups in an organization
* [lagoon list organization-projects](lagoon_list_organization-projects.md) - List projects in an organization
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
## lagoon list organization-admins
## lagoon list organization-admininstrators

List admins in an organization

```
lagoon list organization-admins [flags]
lagoon list organization-admininstrators [flags]
```

### Options

```
-h, --help help for organization-admins
-h, --help help for organization-admininstrators
-O, --organization-name string Name of the organization to list associated users for
```

Expand Down

0 comments on commit 29f002e

Please sign in to comment.