Skip to content

Commit

Permalink
add pluralization to some commands
Browse files Browse the repository at this point in the history
  • Loading branch information
fritz-astronomer committed Jul 6, 2023
1 parent e672f4c commit 0b87d97
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 26 deletions.
2 changes: 1 addition & 1 deletion cmd/airflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ func newAirflowBashCmd() *cobra.Command {
func newAirflowObjectRootCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "object",
Aliases: []string{"obj"},
Aliases: []string{"obj", "objects"},
Short: "Configure your local Airflow environment.",
Long: "Manage local Airflow connections, variables, and pools. Import or export your objects to your Airflow settings file. Configure Airflow's startup behavior using a Compose file.",
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/cloud/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ var (
func newDeploymentRootCmd(out io.Writer) *cobra.Command {
cmd := &cobra.Command{
Use: "deployment",
Aliases: []string{"de"},
Aliases: []string{"de", "deployments"},
Short: "Manage your Deployments running on Astronomer",
Long: "Create or manage Deployments running on Astro according to your Organization and Workspace permissions.",
}
Expand Down Expand Up @@ -212,7 +212,7 @@ func newDeploymentDeleteCmd() *cobra.Command {
func newDeploymentVariableRootCmd(out io.Writer) *cobra.Command {
cmd := &cobra.Command{
Use: "variable",
Aliases: []string{"var"},
Aliases: []string{"var", "variables"},
Short: "Manage Deployment environment variables",
Long: "Manage environment variables for an Astro Deployment. These variables can be used in DAGs or to customize your Airflow environment",
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/cloud/deployment_objects.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const (
func newDeploymentConnectionRootCmd(out io.Writer) *cobra.Command {
cmd := &cobra.Command{
Use: "connection",
Aliases: []string{"con"},
Aliases: []string{"con", "connections"},
Short: "Manage deployment connections",
Long: "Manage connections for an Astro Deployment.",
}
Expand Down Expand Up @@ -231,7 +231,7 @@ func newDeploymentAirflowVariableCopyCmd(out io.Writer) *cobra.Command {
func newDeploymentPoolRootCmd(out io.Writer) *cobra.Command {
cmd := &cobra.Command{
Use: "pool",
Aliases: []string{"pl"},
Aliases: []string{"pl", "pools"},
Short: "Manage Deployment's Airflow pools",
Long: "Manage Airflow pools stored for an Astro Deployment",
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/cloud/deployment_workerqueue.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ var (
func newDeploymentWorkerQueueRootCmd(out io.Writer) *cobra.Command {
cmd := &cobra.Command{
Use: "worker-queue",
Aliases: []string{"wq"},
Aliases: []string{"wq", "worker-queues"},
Short: "Manage Deployment worker queues",
Long: "Manage worker queues for an Astro Deployment.",
}
Expand Down
11 changes: 6 additions & 5 deletions cmd/cloud/organization.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func newOrganizationExportAuditLogs(_ io.Writer) *cobra.Command {
func newOrganizationUserRootCmd(out io.Writer) *cobra.Command {
cmd := &cobra.Command{
Use: "user",
Aliases: []string{"us"},
Aliases: []string{"us", "users"},
Short: "Manage users in your Astro Organization",
Long: "Manage users in your Astro Organization.",
}
Expand Down Expand Up @@ -266,7 +266,7 @@ func userUpdate(cmd *cobra.Command, args []string, out io.Writer) error {
func newOrganizationTeamRootCmd(out io.Writer) *cobra.Command {
cmd := &cobra.Command{
Use: "team",
Aliases: []string{"te"},
Aliases: []string{"te", "teams"},
Short: "Manage teams in your Astro Organization",
Long: "Manage teams in your Astro Organization.",
}
Expand Down Expand Up @@ -375,9 +375,10 @@ func teamDelete(cmd *cobra.Command, out io.Writer, args []string) error {

func newOrganizationTeamUserRootCmd(out io.Writer) *cobra.Command {
cmd := &cobra.Command{
Use: "user",
Short: "Manage users in your Astro Team",
Long: "Manage users in your Astro Team.",
Use: "user",
Aliases: []string{"us", "users"},
Short: "Manage users in your Astro Team",
Long: "Manage users in your Astro Team.",
}
cmd.SetOut(out)
cmd.AddCommand(
Expand Down
4 changes: 2 additions & 2 deletions cmd/cloud/workspace.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func newWorkspaceDeleteCmd(out io.Writer) *cobra.Command {
func newWorkspaceUserRootCmd(out io.Writer) *cobra.Command {
cmd := &cobra.Command{
Use: "user",
Aliases: []string{"us"},
Aliases: []string{"us", "users"},
Short: "Manage users in your Astro Workspace",
Long: "Manage users in your Astro Workspace.",
}
Expand Down Expand Up @@ -246,7 +246,7 @@ func newWorkspaceTokenListCmd(out io.Writer) *cobra.Command {
func newWorkspaceTeamRootCmd(out io.Writer) *cobra.Command {
cmd := &cobra.Command{
Use: "team",
Aliases: []string{"te"},
Aliases: []string{"te", "teams"},
Short: "Manage teams in your Astro Workspace",
Long: "Manage teams in your Astro Workspace.",
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/software/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ $ astro deployment runtime migrate --deployment-id=<deployment-id> --cancel
func newDeploymentRootCmd(out io.Writer) *cobra.Command {
cmd := &cobra.Command{
Use: "deployment",
Aliases: []string{"de"},
Aliases: []string{"de", "deployments"},
Short: "Manage Astronomer Deployments",
Long: "Deployments are individual Airflow clusters running on an installation of the Astronomer platform.",
}
Expand Down
7 changes: 4 additions & 3 deletions cmd/software/deployment_teams.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ const (

func newDeploymentTeamRootCmd(out io.Writer) *cobra.Command {
cmd := &cobra.Command{
Use: "team",
Short: "Manage deployment team resources",
Long: "A Team is a group of users imported from your Identity Provider, teams can be added to and removed from a deployment to manage group user access",
Use: "team",
Aliases: []string{"te", "teams"},
Short: "Manage deployment team resources",
Long: "A Team is a group of users imported from your Identity Provider, teams can be added to and removed from a deployment to manage group user access",
}
_ = cmd.MarkFlagRequired("deployment-id")
cmd.PersistentFlags().StringVar(&deploymentID, "deployment-id", "", "deployment to associate team to")
Expand Down
7 changes: 4 additions & 3 deletions cmd/software/deployment_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ var (

func newDeploymentUserRootCmd(out io.Writer) *cobra.Command {
cmd := &cobra.Command{
Use: "user",
Short: "Manage Deployment user resources",
Long: "Users can be added or removed from Deployment",
Use: "user",
Aliases: []string{"us", "users"},
Short: "Manage Deployment user resources",
Long: "Users can be added or removed from Deployment",
}
cmd.AddCommand(
newDeploymentUserListCmd(out),
Expand Down
7 changes: 4 additions & 3 deletions cmd/software/workspace_teams.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ $ astro workspace team list --workspace-id <workspace-id>`

func newWorkspaceTeamRootCmd(out io.Writer) *cobra.Command {
cmd := &cobra.Command{
Use: "team",
Short: "Manage Workspace Team resources",
Long: "A Team is a group of users imported from your Identity Provider, teams can be added to and removed from a deployment to manage group user access",
Use: "team",
Aliases: []string{"te", "teams"},
Short: "Manage Workspace Team resources",
Long: "A Team is a group of users imported from your Identity Provider, teams can be added to and removed from a deployment to manage group user access",
}
cmd.PersistentFlags().StringVar(&workspaceID, "workspace-id", "", "workspace to associate team to")
cmd.AddCommand(
Expand Down
7 changes: 4 additions & 3 deletions cmd/software/workspace_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ const defaultWorkspaceUserPageSize = 100

func newWorkspaceUserRootCmd(out io.Writer) *cobra.Command {
cmd := &cobra.Command{
Use: "user",
Short: "Manage Workspace User resources",
Long: "Users can be added or removed from Workspaces",
Use: "user",
Aliases: []string{"us", "users"},
Short: "Manage Workspace User resources",
Long: "Users can be added or removed from Workspaces",
}
cmd.AddCommand(
newWorkspaceUserAddCmd(out),
Expand Down

0 comments on commit 0b87d97

Please sign in to comment.