Skip to content

Commit

Permalink
fix: the init github command does not require the shared flags
Browse files Browse the repository at this point in the history
  • Loading branch information
LucaLanziani committed Aug 30, 2023
1 parent 4fbe947 commit a50e158
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
6 changes: 1 addition & 5 deletions src/cli/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,11 @@ const (
func (c CLI) 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)

Expand Down Expand Up @@ -118,7 +114,7 @@ func (c CLI) 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,
},
Expand Down
3 changes: 0 additions & 3 deletions src/services/project/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ type InitOptions struct {
DestinationFolder string
DefaultBranch string
PipelineType string
Repository string
AppName string
ProjectDirectory string
}

func GuessAppName() *string {
Expand Down

0 comments on commit a50e158

Please sign in to comment.