Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos in garm-cli #209

Merged
merged 1 commit into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 3 additions & 15 deletions cmd/garm-cli/cmd/enterprise.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ package cmd
import (
"fmt"

"github.com/cloudbase/garm-provider-common/util"
apiClientEnterprises "github.com/cloudbase/garm/client/enterprises"
"github.com/cloudbase/garm/params"

Expand All @@ -26,10 +25,9 @@ import (
)

var (
enterpriseName string
enterpriseWebhookSecret string
enterpriseCreds string
enterpriseRandomWebhookSecret bool
enterpriseName string
enterpriseWebhookSecret string
enterpriseCreds string
)

// enterpriseCmd represents the enterprise command
Expand Down Expand Up @@ -57,14 +55,6 @@ var enterpriseAddCmd = &cobra.Command{
return errNeedsInitError
}

if enterpriseRandomWebhookSecret {
secret, err := util.GetRandomString(32)
if err != nil {
return err
}
enterpriseWebhookSecret = secret
}

newEnterpriseReq := apiClientEnterprises.NewCreateEnterpriseParams()
newEnterpriseReq.Body = params.CreateEnterpriseParams{
Name: enterpriseName,
Expand Down Expand Up @@ -189,8 +179,6 @@ func init() {
enterpriseAddCmd.Flags().StringVar(&enterpriseName, "name", "", "The name of the enterprise")
enterpriseAddCmd.Flags().StringVar(&enterpriseWebhookSecret, "webhook-secret", "", "The webhook secret for this enterprise")
enterpriseAddCmd.Flags().StringVar(&enterpriseCreds, "credentials", "", "Credentials name. See credentials list.")
enterpriseAddCmd.Flags().BoolVar(&enterpriseRandomWebhookSecret, "random-webhook-secret", false, "Generate a random webhook secret for this organization.")
enterpriseAddCmd.MarkFlagsMutuallyExclusive("webhook-secret", "random-webhook-secret")

enterpriseAddCmd.MarkFlagRequired("credentials") //nolint
enterpriseAddCmd.MarkFlagRequired("name") //nolint
Expand Down
6 changes: 3 additions & 3 deletions cmd/garm-cli/cmd/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ Example:
garm-cli pool list --org=5493e51f-3170-4ce3-9f05-3fe690fc6ec6

List pools from one enterprise:
garm-cli pool list --org=a8ee4c66-e762-4cbe-a35d-175dba2c9e62
garm-cli pool list --enterprise=a8ee4c66-e762-4cbe-a35d-175dba2c9e62

List all pools from all repos and orgs:
List all pools from all repos, orgs and enterprises:
garm-cli pool list --all

`,
Expand Down Expand Up @@ -285,7 +285,7 @@ var poolUpdateCmd = &cobra.Command{
Long: `Updates pool characteristics.

This command updates the pool characteristics. Runners already created prior to updating
the pool, will not be recreated. IF they no longer suit your needs, you will need to
the pool, will not be recreated. If they no longer suit your needs, you will need to
explicitly remove them using the runner delete command.
`,
SilenceUsage: true,
Expand Down
Loading