#8 add gitlab #13

Closed
kgorbunov wants to merge 93 commits from kgorbunov/pkgdash:master into master
2 changed files with 6 additions and 2 deletions
Showing only changes of commit 5a6fd69c38 - Show all commits

View File

@ -202,7 +202,7 @@ func main() {
for pathMod, mod := range mvs { for pathMod, mod := range mvs {
err = gitSource.RequestOpen(ctx, branch, pathMod, mod) err = gitSource.RequestOpen(ctx, branch, pathMod, mod)
if err != nil { if err != nil {
logger.Fatalf(ctx, "failed to create pr: %v", err) logger.Errorf(ctx, "failed to create pr: %v", err)
} }
logger.Infof(ctx, "PR create for %s - %s", pathMod, mod.Version) logger.Infof(ctx, "PR create for %s - %s", pathMod, mod.Version)
} }

View File

@ -134,7 +134,11 @@ func (g *Gitea) RequestOpen(ctx context.Context, branch string, path string, mod
} }
var pulls []*giteaPull var pulls []*giteaPull
req, err := http.NewRequestWithContext(ctx, http.MethodGet, g.URL+"/repos/"+g.Repository+"/pulls?state=open&token="+g.Token, nil) req, err := http.NewRequestWithContext(
ctx,
http.MethodGet,
fmt.Sprintf("%s/repos/%s/%s/pulls?state=open&token=%s", g.URL, g.Owner, g.Repository, g.Token),
nil)
if err != nil { if err != nil {
return err return err
} //Получаем список пулл реквестов } //Получаем список пулл реквестов