Skip to content

Commit

Permalink
Merge pull request #209 from gabriel-samfira/fix-typos
Browse files Browse the repository at this point in the history
Fix typos in garm-cli
  • Loading branch information
gabriel-samfira authored Feb 12, 2024
2 parents 6ca50dc + eb72932 commit 96208bb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 18 deletions.
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

0 comments on commit 96208bb

Please sign in to comment.