#19 #20
@ -259,6 +259,10 @@ func Execute(ctx context.Context, gitSource source.SourceControl, mvs map[string
|
|||||||
logger.Debugf(ctx, fmt.Sprintf("Start update %s from %s to %s", path, mod.Module.Version, mod.Version))
|
logger.Debugf(ctx, fmt.Sprintf("Start update %s from %s to %s", path, mod.Module.Version, mod.Version))
|
||||||
err := gitSource.RequestOpen(ctx, branch, path, mod)
|
err := gitSource.RequestOpen(ctx, branch, path, mod)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if strings.Contains(err.Error(), "already exists") {
|
||||||
|
logger.Debugf(ctx, fmt.Sprintf("skip %s, branch already exists"), path)
|
||||||
|
continue
|
||||||
|
}
|
||||||
logger.Fatal(ctx, fmt.Sprintf("failed to create pr: %v", err))
|
logger.Fatal(ctx, fmt.Sprintf("failed to create pr: %v", err))
|
||||||
}
|
}
|
||||||
logger.Debugf(ctx, fmt.Sprintf("Update successful for %s", path))
|
logger.Debugf(ctx, fmt.Sprintf("Update successful for %s", path))
|
||||||
@ -271,9 +275,6 @@ func Execute(ctx context.Context, gitSource source.SourceControl, mvs map[string
|
|||||||
logger.Debugf(ctx, fmt.Sprintf("Start close for %s", path))
|
logger.Debugf(ctx, fmt.Sprintf("Start close for %s", path))
|
||||||
for _, branch := range cfg.Branches {
|
for _, branch := range cfg.Branches {
|
||||||
if err := gitSource.RequestClose(ctx, branch, path); err != nil {
|
if err := gitSource.RequestClose(ctx, branch, path); err != nil {
|
||||||
if strings.Contains(err.Error(), "already exists") {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
logger.Fatal(ctx, fmt.Sprintf("failed to close pr: %v", err))
|
logger.Fatal(ctx, fmt.Sprintf("failed to close pr: %v", err))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user