From 29f002ecffa829821dff0d9358eb1de76572c1f3 Mon Sep 17 00:00:00 2001 From: Ben Jackson Date: Tue, 6 Aug 2024 16:03:48 +1000 Subject: [PATCH] fix: rename list organization-administrator command to match others (#368) --- cmd/list.go | 10 +++++----- cmd/users.go | 4 ++-- docs/commands/lagoon_list.md | 2 +- ....md => lagoon_list_organization-admininstrators.md} | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) rename docs/commands/{lagoon_list_organization-admins.md => lagoon_list_organization-admininstrators.md} (89%) diff --git a/cmd/list.go b/cmd/list.go index c1b8a934..93d2b4f1 100644 --- a/cmd/list.go +++ b/cmd/list.go @@ -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) @@ -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) @@ -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") diff --git a/cmd/users.go b/cmd/users.go index 71ef3cf7..c1797507 100644 --- a/cmd/users.go +++ b/cmd/users.go @@ -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 { @@ -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) diff --git a/docs/commands/lagoon_list.md b/docs/commands/lagoon_list.md index 76a1f02c..cafd5027 100644 --- a/docs/commands/lagoon_list.md +++ b/docs/commands/lagoon_list.md @@ -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 diff --git a/docs/commands/lagoon_list_organization-admins.md b/docs/commands/lagoon_list_organization-admininstrators.md similarity index 89% rename from docs/commands/lagoon_list_organization-admins.md rename to docs/commands/lagoon_list_organization-admininstrators.md index ca11b668..57dbb837 100644 --- a/docs/commands/lagoon_list_organization-admins.md +++ b/docs/commands/lagoon_list_organization-admininstrators.md @@ -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 ```