mirror of
https://github.com/go-gitea/gitea
synced 2025-08-09 11:08:19 +00:00
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:
@@ -254,7 +254,7 @@ func CheckPrsForBaseBranch(baseRepo *models.Repository, baseBranchName string) e
|
||||
|
||||
// Init runs the task queue to test all the checking status pull requests
|
||||
func Init() error {
|
||||
prQueue = queue.CreateUniqueQueue("pr_patch_checker", handle, "").(queue.UniqueQueue)
|
||||
prQueue = queue.CreateUniqueQueue("pr_patch_checker", handle, "")
|
||||
|
||||
if prQueue == nil {
|
||||
return fmt.Errorf("Unable to create pr_patch_checker Queue")
|
||||
|
@@ -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())
|
||||
|
Reference in New Issue
Block a user