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

#273 fix login logic and api_key handling. #274

Merged
merged 99 commits into from
Jul 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
c0f7869
fix: add proper error and nil handling in config read/write
fhacloid Jun 11, 2024
342a396
fix: change config file permissions to 0600
fhacloid Jun 11, 2024
e9bcd5f
fix: error handling on config open
fhacloid Jun 11, 2024
7b866f4
fix(deprecation): move ioutil to os ReadFile command
fhacloid May 27, 2024
763a7b0
func: move old command to create-raw-env
fhacloid May 28, 2024
38e2fd9
func(internal): add Debug function and make Warning function public
fhacloid May 28, 2024
b3d01d4
wip: add first draft of create-env command.
fhacloid May 28, 2024
b14af5f
wip: update of the middleware to support forms input
fhacloid May 28, 2024
8417ab8
misc: add draft of test for create-env, will integrate real tests later
fhacloid May 28, 2024
de83bff
fix: fixed UpdateProject Middleware
fhacloid May 28, 2024
82dfec0
misc: add real 'test'
fhacloid May 28, 2024
9ca080a
func: add create-stackforms-env, move create-env to create-raw-env
fhacloid Jun 4, 2024
21f4333
fix: fix client generation to includ bad section Organization Project
fhacloid Jun 5, 2024
047571f
func: add generated client method for getProjectConfig
fhacloid Jun 5, 2024
71a8033
func: indent JSON printer and add newline at EOF to make it more
fhacloid Jun 5, 2024
9048b73
misc: change deprecated method
fhacloid Jun 5, 2024
ac53b07
func: add env creation command using stackforms
fhacloid Jun 5, 2024
11f09b6
misc: add createFormsConfig middleware implementation
fhacloid Jun 5, 2024
6bba46d
func: add get-env-config command
fhacloid Jun 5, 2024
be152a6
misc: add new command to cmd
fhacloid Jun 5, 2024
5d0c910
func: add utility function for forms and arg/flag parsing
fhacloid Jun 5, 2024
e5df498
misc: remove deprecated function
fhacloid Jun 5, 2024
54e39a2
misc: add client file
fhacloid Jun 5, 2024
185b772
func: add get-env-config from stackforms
fhacloid Jun 5, 2024
ff4d4fa
misc: add nixos dev env shinanigan
fhacloid Jun 6, 2024
e4f943e
misc: remove dev stuff
fhacloid Jun 6, 2024
1a1fbf4
func: add mergo dependency for recursive map merges
fhacloid Jun 6, 2024
0e14edb
fix: regenerate client with new go version
fhacloid Jun 10, 2024
8b5f4b2
fix: update go.mod and go.sum for updated version
fhacloid Jun 10, 2024
15fbb8e
fix: update legacy code to new generated client
fhacloid Jun 10, 2024
ca418c0
misc: add nil value check in forms parsing
fhacloid Jun 10, 2024
82a2102
misc: add quick fixes from revie
fhacloid Jun 10, 2024
d44f36c
misc: add new generated api client
fhacloid Jun 10, 2024
f64a0fd
fix(tests): fix tests with new indented JSON printer
fhacloid Jun 11, 2024
a31d8a0
tests(helpers): add tests for UpdateMapField
fhacloid Jun 12, 2024
80f5bb2
misc: cleanup legacy param methods in project
fhacloid Jun 12, 2024
e607b68
misc: replace legacy ReadFile method
fhacloid Jun 12, 2024
dcb0968
func(tests): add basic tests for create-env with stackforms
fhacloid Jun 12, 2024
ad0fce0
misc: update nix flakes for go 1.22
fhacloid Jun 12, 2024
419eb5b
fix(create-env): update flags and add some validations
fhacloid Jun 12, 2024
d0a9f52
misc: update legacy code
fhacloid Jun 12, 2024
286a0b1
fix(tests): fix expectation with new json printer
fhacloid Jun 12, 2024
e2bf01e
misc: add more review changes
fhacloid Jun 12, 2024
807e8d0
misc: add nixos dev env shinanigan
fhacloid Jul 2, 2024
a020430
func: update go version to 1.21
fhacloid Jun 6, 2024
d7187a1
misc: add changelog
fhacloid Jun 6, 2024
2981a9a
misc: fix docker compose file ref
fhacloid Jun 6, 2024
cbd2915
misc: update devshell
fhacloid Jun 6, 2024
44eada1
misc: add condition on direnv
fhacloid Jun 10, 2024
1cabe9e
func: bump go version to 1.22.4
fhacloid Jun 11, 2024
fc3a30c
misc: fix deprecated code
fhacloid Jul 2, 2024
8b9ba1c
func: update generated client with 0.31.0 go-swagger
fhacloid Jul 2, 2024
214364e
func: update go-swagger to 0.31.0
fhacloid Jun 11, 2024
a7fcecf
breaking: update APIClient struct api type
fhacloid Jun 11, 2024
bae9d4c
[ci skip]: add changelog
fhacloid Jun 11, 2024
0039595
Delete changelog/unreleased/CLI-INTERNAL-20240606-142703.yaml
fhacloid Jun 12, 2024
f9cabd3
fix: add missed generated route from client
fhacloid Jun 12, 2024
18be3c8
fix(create-env): fix tooltip for create-env
fhacloid Jun 12, 2024
d9881e6
misc: add default value in get project config
fhacloid Jun 12, 2024
b7b6154
func: clean an add get-env command
fhacloid Jun 12, 2024
3d1c3d6
fix: remove deprecated field in legacy command to keep it in help
fhacloid Jun 12, 2024
a10cb32
fix(tests): fix expectation with new create-env ouput
fhacloid Jun 12, 2024
0c8201e
fix(makefile): make wget replace current swagger.yml
fhacloid Jun 12, 2024
3132617
func: update swagger with current develop
fhacloid Jun 12, 2024
36134cf
misc(makefile): fix permissions madness with swagger container
fhacloid Jun 12, 2024
d2f52e9
fix: correct some error messages
fhacloid Jun 12, 2024
95f6199
[ci skip]: add changelog
fhacloid Jun 12, 2024
69320e6
[ci skip]: fix changelog
fhacloid Jun 12, 2024
22c7d0b
Bump swagger client to version v5.0.49-saas
fhacloid Jul 2, 2024
59e453a
[ci skip] v5.0.49-saas release
cycloid-machine Jun 13, 2024
dcc2da8
fix: fix makefile for ci
fhacloid Jun 13, 2024
55ee36b
fix: fix version
fhacloid Jun 13, 2024
ac467a2
fix: add changelog
fhacloid Jun 13, 2024
933d190
func: change api token env var to CY_API_TOKEN
fhacloid Jul 2, 2024
ec6232d
func: make command to fill org via env var
fhacloid Jul 2, 2024
711cfc7
func: allow setting API_KEY via env var for login
fhacloid Jul 2, 2024
3ab0773
fix: remove last required org flags
fhacloid Jul 2, 2024
1aab90a
func: make login use CY_API_KEY env var as preference
fhacloid Jul 2, 2024
e8b6117
fix: add proper error and nil handling in config read/write
fhacloid Jun 11, 2024
257ca9b
fix: change config file permissions to 0600
fhacloid Jun 11, 2024
693d717
fix: error handling on config open
fhacloid Jun 11, 2024
562714a
misc: add nixos dev env shinanigan
fhacloid Jul 2, 2024
12d0932
func: update go version to 1.21
fhacloid Jul 2, 2024
cd63328
func: bump go version to 1.22.4
fhacloid Jun 11, 2024
10d8a61
misc: fix deprecated code
fhacloid Jul 2, 2024
8ec5a9f
func: update generated client with 0.31.0 go-swagger
fhacloid Jul 2, 2024
5830be0
Bump swagger client to version v5.0.49-saas
fhacloid Jul 2, 2024
87e9a14
func: change api token env var to CY_API_TOKEN
fhacloid Jul 2, 2024
11412a2
func: make command to fill org via env var
fhacloid Jul 2, 2024
d751041
func: allow setting API_KEY via env var for login
fhacloid Jul 2, 2024
75e4b3c
fix: remove last required org flags
fhacloid Jul 2, 2024
0e3b8f8
func: make login use CY_API_KEY env var as preference
fhacloid Jul 2, 2024
7923097
Merge branch '273-fix-login' of github.com:cycloidio/cycloid-cli into…
fhacloid Jul 2, 2024
c177fab
fix: fix bad merge
fhacloid Jul 2, 2024
01d67e1
fix(test): --api-key is not required anymore
fhacloid Jul 2, 2024
3e71994
fix(tests): fix last org flags shinanigans
fhacloid Jul 2, 2024
6103014
misc: fix makefile
fhacloid Jul 2, 2024
633baee
misc: add changelog
fhacloid Jul 2, 2024
3b6e093
misc: fix changelog pr number
fhacloid Jul 2, 2024
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
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ ecr-connect: ## Login to ecr, requires aws cli installed
start-local-be: ## Starts local BE instance. Note! Only for cycloid developers
@if [ ! -d ${LOCAL_BE_GIT_PATH} ]; then echo "Unable to find BE at LOCAL_BE_GIT_PATH"; exit 1; fi;
@if [ -z "$$API_LICENCE_KEY" ]; then echo "API_LICENCE_KEY is not set"; exit 1; fi; \
@echo "Starting Local BE..."
echo "Starting Local BE..."
@echo "Generating fake data to be used in the tests..."
@cd $(LOCAL_BE_GIT_PATH) && sed -i '/cost-explorer-es/d' config.yml
@cd $(LOCAL_BE_GIT_PATH) && YD_API_TAG=${YD_API_TAG} API_LICENCE_KEY=${API_LICENCE_KEY} \
Expand All @@ -159,4 +159,3 @@ delete-local-be: ## Creates local BE instance and starts e2e tests. Note! Only f
new-changelog-entry: ## Create a new entry for unreleased element
@echo ${PATH}
docker run -it -v $(CURDIR):/cycloid-cli -w /cycloid-cli cycloid/cycloid-toolkit changie new

9 changes: 9 additions & 0 deletions changelog/unreleased/CLI-BREAKING-20240702-154137.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
component: CLI
kind: BREAKING
body: Env var TOKEN is replaced by CY_API_KEY for giving token via env var.
time: 2024-07-02T15:41:37.096071763Z
custom:
DETAILS: The old `TOKEN` env var still works but emits a warning. It will be removed
in a futur release.
PR: "274"
TYPE: CLI
9 changes: 9 additions & 0 deletions changelog/unreleased/CLI-CHANGED-20240702-153738.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
component: CLI
kind: CHANGED
body: Allow to use CY_ORG env var to define the current org instead of --org flag
time: 2024-07-02T15:37:38.698172633Z
custom:
DETAILS: You can still use the --org flag, the CLI flag will have precedence over
the env var.
PR: "274"
TYPE: CLI
9 changes: 9 additions & 0 deletions changelog/unreleased/CLI-FIXED-20240702-154027.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
component: CLI
kind: FIXED
body: --org flag is now global
time: 2024-07-02T15:40:27.815286561Z
custom:
DETAILS: This fixes inconsistency between commands, you can also set the org via
env vars now.
PR: "274"
TYPE: CLI
8 changes: 8 additions & 0 deletions changelog/unreleased/CLI-SECURITY-20240702-153824.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
component: CLI
kind: SECURITY
body: Make the configuration write as 0600 permissions in user home config
time: 2024-07-02T15:38:24.286288523Z
custom:
DETAILS: ""
PR: "274"
TYPE: CLI
10 changes: 10 additions & 0 deletions changelog/unreleased/CLI-SECURITY-20240702-153935.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
component: CLI
kind: SECURITY
body: Allow to login using CY_API_TOKEN instead of providing the token via --api-token
flag
time: 2024-07-02T15:39:35.1456052Z
custom:
DETAILS: This will become the default way, using the flag will be deprecated in
the future.
PR: "274"
TYPE: CLI
13 changes: 12 additions & 1 deletion cmd/cycloid.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,15 @@ func NewRootCommand() *cobra.Command {
SilenceUsage: false,
Use: "cy",
Short: "Cycloid CLI",
Long: `Cy is a CLI for Cycloid framework. Learn more at https://www.cycloid.io/.`,
Long: `CLI tool to interact with Cycloid API.
Documentation at https://docs.beta.cycloid.io/reference/cli/

Environment:

CY_API_URL -> Specify the HTTP url of Cycloid API to use, default https://http-api.cycloid.io
CY_ORG -> Set the current organization
CY_API_TOKEN -> Set the current API TOKEN
CY_VERBOSITY -> Set the verbosity level (debug, info, warning, error), default warning `,
}

rootCmd.PersistentFlags().StringVarP(&userOutput, "output", "o", "table", "The formatting style for command output: json|yaml|table")
Expand All @@ -63,6 +71,9 @@ func NewRootCommand() *cobra.Command {
rootCmd.PersistentFlags().Bool("insecure", false, "Decide to skip or not TLS verification")
viper.BindPFlag("insecure", rootCmd.PersistentFlags().Lookup("insecure"))

rootCmd.PersistentFlags().String("org", "", "Specify the org to use. override CY_ORG env var. Required for all Org scoped endpoint.")
viper.BindPFlag("org", rootCmd.PersistentFlags().Lookup("org"))

// Remove usage on error, this is annoying in scripting
rootCmd.SilenceUsage = true

Expand Down
3 changes: 0 additions & 3 deletions cmd/cycloid/apikey/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ package apikey

import (
"github.com/spf13/cobra"

"github.com/cycloidio/cycloid-cli/cmd/cycloid/common"
)

var (
Expand All @@ -24,7 +22,6 @@ func NewCommands() *cobra.Command {
Example: example,
Short: short,
}
common.RequiredPersistentFlag(common.WithFlagOrg, cmd)

cmd.AddCommand(
NewDeleteCommand(),
Expand Down
31 changes: 15 additions & 16 deletions cmd/cycloid/apikey/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,7 @@ func NewDeleteCommand() *cobra.Command {
# delete the API key 'my-key' in the org my-org
cy api-key delete --org my-org --canonical my-key
`,
RunE: func(cmd *cobra.Command, args []string) error {
org, err := cmd.Flags().GetString("org")
if err != nil {
return fmt.Errorf("unable to get org flag: %w", err)
}
output, err := cmd.Flags().GetString("output")
if err != nil {
return fmt.Errorf("unable to get output flag: %w", err)
}
canonical, err := cmd.Flags().GetString("canonical")
if err != nil {
return fmt.Errorf("unable to get canonical flag: %w", err)
}
return remove(cmd, org, canonical, output)
},
RunE: remove,
}

WithFlagCanonical(cmd)
Expand All @@ -46,7 +32,20 @@ func NewDeleteCommand() *cobra.Command {

// remove will send the DELETE request to the API in order to
// delete a generated token
func remove(cmd *cobra.Command, org, canonical, output string) error {
func remove(cmd *cobra.Command, args []string) error {
org, err := common.GetOrg(cmd)
if err != nil {
return fmt.Errorf("unable to get org flag: %w", err)
}
output, err := cmd.Flags().GetString("output")
if err != nil {
return fmt.Errorf("unable to get output flag: %w", err)
}
canonical, err := cmd.Flags().GetString("canonical")
if err != nil {
return fmt.Errorf("unable to get canonical flag: %w", err)
}

api := common.NewAPI()
m := middleware.NewMiddleware(api)

Expand Down
31 changes: 15 additions & 16 deletions cmd/cycloid/apikey/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,7 @@ func NewGetCommand() *cobra.Command {
# get API key 'my-key' in the org my-org
cy api-key get --org my-org --canonical my-key
`,
RunE: func(cmd *cobra.Command, args []string) error {
org, err := cmd.Flags().GetString("org")
if err != nil {
return fmt.Errorf("unable to get org flag: %w", err)
}
output, err := cmd.Flags().GetString("output")
if err != nil {
return fmt.Errorf("unable to get output flag: %w", err)
}
canonical, err := cmd.Flags().GetString("canonical")
if err != nil {
return fmt.Errorf("unable to get canonical flag: %w", err)
}
return get(cmd, org, canonical, output)
},
RunE: get,
}

WithFlagCanonical(cmd)
Expand All @@ -46,7 +32,20 @@ func NewGetCommand() *cobra.Command {

// get will send the GET request to the API in order to
// get the generated token
func get(cmd *cobra.Command, org, canonical, output string) error {
func get(cmd *cobra.Command, args []string) error {
org, err := common.GetOrg(cmd)
if err != nil {
return fmt.Errorf("unable to get org flag: %w", err)
}
output, err := cmd.Flags().GetString("output")
if err != nil {
return fmt.Errorf("unable to get output flag: %w", err)
}
canonical, err := cmd.Flags().GetString("canonical")
if err != nil {
return fmt.Errorf("unable to get canonical flag: %w", err)
}

api := common.NewAPI()
m := middleware.NewMiddleware(api)

Expand Down
30 changes: 15 additions & 15 deletions cmd/cycloid/apikey/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,35 +19,35 @@ func NewListCommand() *cobra.Command {
Use: "list",
Short: "list API keys",
Example: `
# list API keys in the org my-org
cy api-key list --org my-org
# list API keys in the org my-org
cy api-key list --org my-org
`,
RunE: func(cmd *cobra.Command, args []string) error {
org, err := cmd.Flags().GetString("org")
if err != nil {
return fmt.Errorf("unable to get org flag: %w", err)
}
output, err := cmd.Flags().GetString("output")
if err != nil {
return fmt.Errorf("unable to get output flag: %w", err)
}
return list(cmd, org, output)
},
RunE: list,
}
return cmd
}

// list will send the GET request to the API in order to
// list the generated tokens
func list(cmd *cobra.Command, org, output string) error {
func list(cmd *cobra.Command, args []string) error {
api := common.NewAPI()
m := middleware.NewMiddleware(api)

org, err := cmd.Flags().GetString("org")
if err != nil {
return err
}

output, err := cmd.Flags().GetString("output")
if err != nil {
return fmt.Errorf("unable to get output flag: %w", err)
}

// fetch the printer from the factory
p, err := factory.GetPrinter(output)
if err != nil {
return errors.Wrap(err, "unable to get printer")
}

keys, err := m.ListAPIKey(org)
return printer.SmartPrint(p, keys, err, "unable to list API keys", printer.Options{}, cmd.OutOrStdout())
}
2 changes: 0 additions & 2 deletions cmd/cycloid/catalog-repositories/cmd.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package catalogRepositories

import (
"github.com/cycloidio/cycloid-cli/cmd/cycloid/common"
"github.com/spf13/cobra"
)

Expand All @@ -15,7 +14,6 @@ func NewCommands() *cobra.Command {
},
Short: "Manage the catalog repositories",
}
common.RequiredPersistentFlag(common.WithFlagOrg, cmd)

cmd.AddCommand(NewCreateCommand(),
NewUpdateCommand(),
Expand Down
2 changes: 1 addition & 1 deletion cmd/cycloid/catalog-repositories/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func createCatalogRepository(cmd *cobra.Command, args []string) error {
api := common.NewAPI()
m := middleware.NewMiddleware(api)

org, err := cmd.Flags().GetString("org")
org, err := common.GetOrg(cmd)
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/cycloid/catalog-repositories/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func deleteCatalogRepository(cmd *cobra.Command, args []string) error {
api := common.NewAPI()
m := middleware.NewMiddleware(api)

org, err := cmd.Flags().GetString("org")
org, err := common.GetOrg(cmd)
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/cycloid/catalog-repositories/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func getCatalogRepository(cmd *cobra.Command, args []string) error {
api := common.NewAPI()
m := middleware.NewMiddleware(api)

org, err := cmd.Flags().GetString("org")
org, err := common.GetOrg(cmd)
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/cycloid/catalog-repositories/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func listCatalogRepositories(cmd *cobra.Command, args []string) error {
api := common.NewAPI()
m := middleware.NewMiddleware(api)

org, err := cmd.Flags().GetString("org")
org, err := common.GetOrg(cmd)
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/cycloid/catalog-repositories/refresh.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func refreshCatalogRepository(cmd *cobra.Command, args []string) error {
api := common.NewAPI()
m := middleware.NewMiddleware(api)

org, err := cmd.Flags().GetString("org")
org, err := common.GetOrg(cmd)
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/cycloid/catalog-repositories/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func updateCatalogRepository(cmd *cobra.Command, args []string) error {
api := common.NewAPI()
m := middleware.NewMiddleware(api)

org, err := cmd.Flags().GetString("org")
org, err := common.GetOrg(cmd)
if err != nil {
return err
}
Expand Down
20 changes: 16 additions & 4 deletions cmd/cycloid/common/flags.go
Original file line number Diff line number Diff line change
@@ -1,18 +1,30 @@
package common

import (
"fmt"
"os"

"github.com/pkg/errors"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)

var (
projectFlag, envFlag, orgFlag, credFlag, canFlag string
idFlag uint32
)

func WithFlagOrg(cmd *cobra.Command) string {
flagName := "org"
cmd.PersistentFlags().StringVar(&orgFlag, flagName, "", "Org cannonical name")
return flagName
func GetOrg(cmd *cobra.Command) (org string, err error) {
org = viper.GetString("org")
if org == "" {
return "", errors.New("org is not set, use --org flag or CY_ORG env var")
}

if viper.GetString("verbosity") == "debug" {
fmt.Fprintln(os.Stderr, "\033[1;34mdebug:\033[0m using org:", org)
}

return org, nil
}

func WithFlagProject(cmd *cobra.Command) string {
Expand Down
12 changes: 9 additions & 3 deletions cmd/cycloid/common/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,16 @@ func (a *APIClient) Credentials(org *string) runtime.ClientAuthInfoWriter {
var token = a.Config.Token
if token == "" {
// we first try to get the token from the env variable
token = os.Getenv("TOKEN")
var ok bool
token, ok = os.LookupEnv("CY_API_TOKEN")
if !ok {
token, ok = os.LookupEnv("TOKEN")
if ok {
fmt.Println("TOKEN env var is deprecated, please use CY_API_TOKEN instead")
}
}
}

// if the token is not set with env variable we try to fetch
// him from the config (if the user is logged)
if len(token) == 0 {
Expand Down Expand Up @@ -332,8 +340,6 @@ func ParseFormsConfig(form *models.FormUseCase, getCurrent bool) (vars map[strin
vars[*varEntity.Key] = value
}

// We have to strings.ToLower() the groups and sections names
// otherwise, it will not be recognized as input for a create-env
groups[strings.ToLower(*group.Name)] = vars
}

Expand Down
3 changes: 0 additions & 3 deletions cmd/cycloid/config-repositories/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ package configRepositories

import (
"github.com/spf13/cobra"

"github.com/cycloidio/cycloid-cli/cmd/cycloid/common"
)

func NewCommands() *cobra.Command {
Expand All @@ -15,7 +13,6 @@ func NewCommands() *cobra.Command {
},
Short: "Manage the catalog repositories",
}
common.RequiredPersistentFlag(common.WithFlagOrg, cmd)

cmd.AddCommand(NewCreateCommand(),
NewUpdateCommand(),
Expand Down
Loading