with https

This commit is contained in:
Kasper Juul Hermansen 2022-09-15 10:48:31 +02:00
parent 04d1ffc971
commit 2c37384af5
Signed by: kjuulh
GPG Key ID: 57B6E1465221F912
3 changed files with 5 additions and 4 deletions

View File

@ -138,7 +138,7 @@ select:
- git@git.front.kjuulh.io:kjuulh/kraken-test.git - git@git.front.kjuulh.io:kjuulh/kraken-test.git
- git@git.front.kjuulh.io:kjuulh/kraken-test.git - git@git.front.kjuulh.io:kjuulh/kraken-test.git
providers: providers:
- gitea: git.front.kjuulh.io - gitea: https://git.front.kjuulh.io
organisation: "kraken" organisation: "kraken"
actions: actions:
- type: go - type: go

View File

@ -22,7 +22,7 @@ func CreateKrakenProcessCmd() *cobra.Command {
Path string `json:"path"` Path string `json:"path"`
}{ }{
Repository: "git@git.front.kjuulh.io:kjuulh/kraken.git", Repository: "git@git.front.kjuulh.io:kjuulh/kraken.git",
Branch: "feature/process_repos", Branch: "feature/gitea-integration",
Path: "_examples/actions/write_a_readme/", Path: "_examples/actions/write_a_readme/",
}) })
if err != nil { if err != nil {

View File

@ -27,10 +27,11 @@ func (g *Gitea) ListRepositoriesForOrganization(ctx context.Context, server stri
return nil, err return nil, err
} }
g.logger.Debug("Listing repos for gitea", zap.String("server", server))
repos, resp, err := client.ListOrgRepos(organization, gitea.ListOrgReposOptions{ repos, resp, err := client.ListOrgRepos(organization, gitea.ListOrgReposOptions{
ListOptions: gitea.ListOptions{ ListOptions: gitea.ListOptions{
Page: 0, Page: 0,
PageSize: 0, PageSize: 20,
}, },
}) })
if err != nil { if err != nil {
@ -53,7 +54,7 @@ func (g *Gitea) getOrCreateClient(ctx context.Context, server string) (*gitea.Cl
g.giteamu.Lock() g.giteamu.Lock()
defer g.giteamu.Unlock() defer g.giteamu.Unlock()
client, ok := g.giteaClients[server] client, ok := g.giteaClients[server]
if !ok { if !ok || client == nil {
c, err := gitea.NewClient(server) c, err := gitea.NewClient(server)
if err != nil { if err != nil {
return nil, nil return nil, nil