From 2c37384af575f2efcb70e73da1f92747034e7d04 Mon Sep 17 00:00:00 2001 From: kjuulh Date: Thu, 15 Sep 2022 10:48:31 +0200 Subject: [PATCH] with https --- _examples/actions/write_a_readme/kraken.yml | 2 +- cmd/kraken/commands/process.go | 2 +- internal/gitproviders/gitea.go | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/_examples/actions/write_a_readme/kraken.yml b/_examples/actions/write_a_readme/kraken.yml index 38ac8e1..336f229 100644 --- a/_examples/actions/write_a_readme/kraken.yml +++ b/_examples/actions/write_a_readme/kraken.yml @@ -138,7 +138,7 @@ select: - git@git.front.kjuulh.io:kjuulh/kraken-test.git - git@git.front.kjuulh.io:kjuulh/kraken-test.git providers: - - gitea: git.front.kjuulh.io + - gitea: https://git.front.kjuulh.io organisation: "kraken" actions: - type: go diff --git a/cmd/kraken/commands/process.go b/cmd/kraken/commands/process.go index 81642ea..342ebc4 100644 --- a/cmd/kraken/commands/process.go +++ b/cmd/kraken/commands/process.go @@ -22,7 +22,7 @@ func CreateKrakenProcessCmd() *cobra.Command { Path string `json:"path"` }{ Repository: "git@git.front.kjuulh.io:kjuulh/kraken.git", - Branch: "feature/process_repos", + Branch: "feature/gitea-integration", Path: "_examples/actions/write_a_readme/", }) if err != nil { diff --git a/internal/gitproviders/gitea.go b/internal/gitproviders/gitea.go index 536fe16..7af3ca5 100644 --- a/internal/gitproviders/gitea.go +++ b/internal/gitproviders/gitea.go @@ -27,10 +27,11 @@ func (g *Gitea) ListRepositoriesForOrganization(ctx context.Context, server stri return nil, err } + g.logger.Debug("Listing repos for gitea", zap.String("server", server)) repos, resp, err := client.ListOrgRepos(organization, gitea.ListOrgReposOptions{ ListOptions: gitea.ListOptions{ Page: 0, - PageSize: 0, + PageSize: 20, }, }) if err != nil { @@ -53,7 +54,7 @@ func (g *Gitea) getOrCreateClient(ctx context.Context, server string) (*gitea.Cl g.giteamu.Lock() defer g.giteamu.Unlock() client, ok := g.giteaClients[server] - if !ok { + if !ok || client == nil { c, err := gitea.NewClient(server) if err != nil { return nil, nil