From 406601eead9b789dc01f1f177bfcdae38f81a2bb Mon Sep 17 00:00:00 2001 From: Somtochi Onyekwere Date: Thu, 14 Jan 2021 20:09:55 +0100 Subject: [PATCH] Update pkg/git to v0.2.2 Signed-off-by: Somtochi Onyekwere --- cmd/flux/bootstrap_gitlab.go | 16 ++++++---------- go.mod | 2 +- go.sum | 4 ++-- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/cmd/flux/bootstrap_gitlab.go b/cmd/flux/bootstrap_gitlab.go index dbbc5793..5767a0e0 100644 --- a/cmd/flux/bootstrap_gitlab.go +++ b/cmd/flux/bootstrap_gitlab.go @@ -129,16 +129,7 @@ func bootstrapGitLabCmdRun(cmd *cobra.Command, args []string) error { return fmt.Errorf("cluster already bootstrapped to %v path", usedPath) } - provider := &git.GitLabProvider{ - IsPrivate: glPrivate, - IsPersonal: glPersonal, - } - owner, err := provider.GetRepositoryOwner(ctx, glToken, glOwner) - if err != nil { - return err - } - - repository, err := git.NewRepository(glRepository, owner, glHostname, glToken, "flux", glOwner+"@users.noreply.gitlab.com") + repository, err := git.NewRepository(glRepository, glOwner, glHostname, glToken, "flux", glOwner+"@users.noreply.gitlab.com") if err != nil { return err } @@ -153,6 +144,11 @@ func bootstrapGitLabCmdRun(cmd *cobra.Command, args []string) error { } defer os.RemoveAll(tmpDir) + provider := &git.GitLabProvider{ + IsPrivate: glPrivate, + IsPersonal: glPersonal, + } + // create GitLab project if doesn't exists logger.Actionf("connecting to %s", glHostname) changed, err := provider.CreateRepository(ctx, repository) diff --git a/go.mod b/go.mod index 034dc94a..2d3d7fe8 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/fluxcd/kustomize-controller/api v0.5.3 github.com/fluxcd/notification-controller/api v0.5.0 github.com/fluxcd/pkg/apis/meta v0.5.0 - github.com/fluxcd/pkg/git v0.2.0 + github.com/fluxcd/pkg/git v0.2.1 github.com/fluxcd/pkg/runtime v0.4.0 github.com/fluxcd/pkg/ssh v0.0.5 github.com/fluxcd/pkg/untar v0.0.5 diff --git a/go.sum b/go.sum index 6cba0860..4427f66e 100644 --- a/go.sum +++ b/go.sum @@ -188,8 +188,8 @@ github.com/fluxcd/notification-controller/api v0.5.0 h1:xKKFnPVsYl2+GEjgKz5a5Mq6 github.com/fluxcd/notification-controller/api v0.5.0/go.mod h1:yLd+nrCJUThSkt4U+LLv8TRxqZdR11+gE1S2/bhgqmE= github.com/fluxcd/pkg/apis/meta v0.5.0 h1:FaU++mQY0g4sVVl+hG+vk0CXBLbb4EVfRuzs3IjLXvo= github.com/fluxcd/pkg/apis/meta v0.5.0/go.mod h1:aEUuZIawboAAFLlYz/juVJ7KNmlWbBtJFYkOWWmGUR4= -github.com/fluxcd/pkg/git v0.2.0 h1:EFFa8ud+9OgEQ7IhyG1pV9+jsHycBtDEHal5odjuvMM= -github.com/fluxcd/pkg/git v0.2.0/go.mod h1:8v0QVumu1ugMG3nJL0KMYPZgmLjzesJHA2sOtXAHLPA= +github.com/fluxcd/pkg/git v0.2.1 h1:7as7kMjxTFpM4dpSmwQqM/fYXDlQhZdbNnuytI6O57k= +github.com/fluxcd/pkg/git v0.2.1/go.mod h1:8v0QVumu1ugMG3nJL0KMYPZgmLjzesJHA2sOtXAHLPA= github.com/fluxcd/pkg/runtime v0.4.0 h1:d/1okReK7ZyrQ2k/GKY1BEiMZNHu1rWKUxlHx2O45EY= github.com/fluxcd/pkg/runtime v0.4.0/go.mod h1:0Rbkgh3qj8Dl4uitccLc13hZyet1vvNJCAFAVUwNZDM= github.com/fluxcd/pkg/ssh v0.0.5 h1:rnbFZ7voy2JBlUfMbfyqArX2FYaLNpDhccGFC3qW83A=