You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix 500 Error with branch and tag sharing the same name #15592
Fixed 500 error while create Pull request when there are more
than one sources (branch, tag) with the same name
Fix#15592
Signed-off-by: Viktor Yakovchuk <viktor@yakovchuk.net>
log.Info("Unable to push PR head for %s#%d (%-v:%s) due to rejection:\nStdout: %s\nStderr: %s\nError: %v", pr.BaseRepo.FullName(), pr.Index, pr.BaseRepo, gitRefName, rejectErr.StdOut, rejectErr.StdErr, rejectErr.Err)
429
433
returnerr
434
+
} elseifgit.IsErrMoreThanOne(err) {
435
+
log.Info("Retrying to push with refs/heads/%s", pr.HeadBranch)
436
+
ifprefixHeadBranch!="" {
437
+
log.Info("Can't push with refs/heads/%s", pr.HeadBranch)
438
+
returnerr
439
+
}
440
+
err=pushToBaseRepoHelper(pr, "refs/heads/")
441
+
returnerr
430
442
}
431
443
log.Error("Unable to push PR head for %s#%d (%-v:%s) due to Error: %v", pr.BaseRepo.FullName(), pr.Index, pr.BaseRepo, gitRefName, err)
0 commit comments