#8 implement interface Source and methods for gitea without Update #9

Merged
vtolstov merged 27 commits from kgorbunov/pkgdash:master into master 2024-03-24 20:52:34 +03:00
Showing only changes of commit 367426a1f9 - Show all commits

View File

@ -145,6 +145,7 @@ func (g *Gitea) RequestOpen(ctx context.Context, branch string, path string, mod
}
for _, pull := range pulls {
logger.Info(ctx, fmt.Sprintf("PULL title - %s | ref - %s", pull.Title, pull.Base.Ref))
if strings.Contains(pull.Title, path) && strings.Contains(pull.Base.Ref, branch) {
logger.Info(ctx, fmt.Sprintf("skip %s as pr already exists %s", path, pull.URL))
return ErrPRExist
@ -175,7 +176,8 @@ func (g *Gitea) RequestOpen(ctx context.Context, branch string, path string, mod
Create: true,
Force: true,
}); err != nil {
logger.Fatal(ctx, fmt.Sprintf("failed to checkout tree: %v", err))
logger.Error(ctx, fmt.Sprintf("failed to checkout tree: %v", err))
return err
} //создаем новую ветку
epath, err := exec.LookPath("go")