#8 add log fo check pull.
This commit is contained in:
parent
4ba405adbc
commit
367426a1f9
@ -145,6 +145,7 @@ func (g *Gitea) RequestOpen(ctx context.Context, branch string, path string, mod
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, pull := range pulls {
|
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) {
|
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))
|
logger.Info(ctx, fmt.Sprintf("skip %s as pr already exists %s", path, pull.URL))
|
||||||
return ErrPRExist
|
return ErrPRExist
|
||||||
@ -175,7 +176,8 @@ func (g *Gitea) RequestOpen(ctx context.Context, branch string, path string, mod
|
|||||||
Create: true,
|
Create: true,
|
||||||
Force: true,
|
Force: true,
|
||||||
}); err != nil {
|
}); 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")
|
epath, err := exec.LookPath("go")
|
||||||
|
Loading…
Reference in New Issue
Block a user