From 6c9a32cfc682b5a081a84eb93c2d3550730720e8 Mon Sep 17 00:00:00 2001 From: Luca Lanziani Date: Thu, 31 Aug 2023 16:05:32 +0200 Subject: [PATCH] fix: the init github command does not require the shared flags (#93) --- src/cli/init.go | 6 +----- src/services/project/project.go | 3 --- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/cli/init.go b/src/cli/init.go index 6ba2591..7397bc0 100644 --- a/src/cli/init.go +++ b/src/cli/init.go @@ -22,15 +22,11 @@ const ( func (c icli) InitGithubCMD(cCtx *cli.Context) error { logger := log.New(os.Stderr) logger.SetLevel(log.DebugLevel) - registry := cCtx.String(repoNameFlag) options := project.InitOptions{ PipelineType: cCtx.Command.Name, DestinationFolder: cCtx.String(destinationFolderFlag), DefaultBranch: cCtx.String(defaultBranchFlag), - AppName: cCtx.String(appNameFlag), - Repository: registry, - ProjectDirectory: cCtx.String(projectDirectoryFlag), } data, err := project.ProjectInit(options, c.Resources) @@ -120,7 +116,7 @@ func (c icli) InitCMD() *cli.Command { { Name: "github", Usage: "create a github pipeline yaml file", - Flags: c.CommandFlags([]FlagsType{InitGithub, Shared}), + Flags: c.CommandFlags([]FlagsType{InitGithub}), Action: c.InitGithubCMD, Before: c.baseBeforeFunc, }, diff --git a/src/services/project/project.go b/src/services/project/project.go index fcadcd6..5dd3d02 100644 --- a/src/services/project/project.go +++ b/src/services/project/project.go @@ -32,9 +32,6 @@ type InitOptions struct { DestinationFolder string DefaultBranch string PipelineType string - Repository string - AppName string - ProjectDirectory string } func GuessAppName() *string {