Skip to content

Commit

Permalink
fix: split command creates a new repo as public
Browse files Browse the repository at this point in the history
 relates to issue jenkins-x#7535

Signed-off-by: dror <dror@immagnify.com>
  • Loading branch information
drorventura committed Sep 7, 2020
1 parent c65b5e2 commit 8fd0e7e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/cmd/step/step_split_monorepo.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ type StepSplitMonorepoOptions struct {
OutputDir string
KubernetesDir string
NoGit bool
PrivateGit bool
}

// NewCmdStepSplitMonorepo Creates a new Command object
Expand Down Expand Up @@ -77,6 +78,7 @@ func NewCmdStepSplitMonorepo(commonOpts *opts.CommonOptions) *cobra.Command {
cmd.Flags().StringVarP(&options.OutputDir, opts.OptionOutputDir, "d", "generated", "The output directory where new projects are created")
cmd.Flags().StringVarP(&options.KubernetesDir, "kubernetes-folder", "", defaultKubernetesDir, "The folder containing all the Kubernetes YAML for each app")
cmd.Flags().BoolVarP(&options.NoGit, "no-git", "", false, "If enabled then don't try to clone/create the separate repositories in github")
cmd.Flags().BoolVarP(&options.PrivateGit, "private-git", "", false, "If enabled then make clone/create to a private github repository")
return cmd
}

Expand Down Expand Up @@ -188,7 +190,7 @@ func (o *StepSplitMonorepoOptions) Run() error {

if !o.NoGit {
if createRepo {
repo, err = gitProvider.CreateRepository(organisation, name, false)
repo, err = gitProvider.CreateRepository(organisation, name, o.PrivateGit)
if err != nil {
return err
}
Expand Down

0 comments on commit 8fd0e7e

Please # to comment.