Skip to content

Commit

Permalink
fix: the init github command does not require the shared flags (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
LucaLanziani authored Aug 31, 2023
1 parent 14a0811 commit 6c9a32c
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 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)

Expand Down Expand Up @@ -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,
},
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 6c9a32c

Please sign in to comment.