forked from NYANDEV/forgejo
Backport #17598 Backport #17606 Backport #17608 Backport #17609 - Since https://gitea.com/gitea/test-env/pulls/10 the golangci-lint has been upgraded and is erroring about new warnings in the code, this PR fixes those warnings.
This commit is contained in:
parent
1cec7f5ab5
commit
ea0fe83888
96 changed files with 139 additions and 64 deletions
|
@ -273,8 +273,8 @@ func rawMerge(pr *models.PullRequest, doer *models.User, mergeStyle models.Merge
|
|||
filepath.Join(tmpBasePath, ".git", "rebase-merge", "stopped-sha"), // Git >= 2.26
|
||||
}
|
||||
for _, failingCommitPath := range failingCommitPaths {
|
||||
if _, statErr := os.Stat(filepath.Join(failingCommitPath)); statErr == nil {
|
||||
commitShaBytes, readErr := ioutil.ReadFile(filepath.Join(failingCommitPath))
|
||||
if _, statErr := os.Stat(failingCommitPath); statErr == nil {
|
||||
commitShaBytes, readErr := ioutil.ReadFile(failingCommitPath)
|
||||
if readErr != nil {
|
||||
// Abandon this attempt to handle the error
|
||||
log.Error("git rebase staging on to base [%s:%s -> %s:%s]: %v\n%s\n%s", pr.HeadRepo.FullName(), pr.HeadBranch, pr.BaseRepo.FullName(), pr.BaseBranch, err, outbuf.String(), errbuf.String())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue