feature/gitea-integration #10

Merged
kjuulh merged 10 commits from feature/gitea-integration into v0.1 2022-09-18 00:10:44 +02:00
3 changed files with 5 additions and 4 deletions
Showing only changes of commit 2c37384af5 - Show all commits

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
providers:
- gitea: git.front.kjuulh.io
- gitea: https://git.front.kjuulh.io
organisation: "kraken"
actions:
- type: go

View File

@ -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 {

View File

@ -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