1
1
mirror of https://github.com/go-gitea/gitea synced 2025-10-28 01:48:25 +00:00

Fix various trivial problems (#35714)

This commit is contained in:
wxiaoguang
2025-10-21 13:19:29 +08:00
committed by GitHub
parent b2ee5be52e
commit a2eea2fb2e
6 changed files with 17 additions and 7 deletions

View File

@@ -5,6 +5,7 @@ package automergequeue
import (
"context"
"errors"
"fmt"
issues_model "code.gitea.io/gitea/models/issues"
@@ -17,7 +18,7 @@ var AutoMergeQueue *queue.WorkerPoolQueue[string]
var AddToQueue = func(pr *issues_model.PullRequest, sha string) {
log.Trace("Adding pullID: %d to the pull requests patch checking queue with sha %s", pr.ID, sha)
if err := AutoMergeQueue.Push(fmt.Sprintf("%d_%s", pr.ID, sha)); err != nil {
if err := AutoMergeQueue.Push(fmt.Sprintf("%d_%s", pr.ID, sha)); err != nil && !errors.Is(err, queue.ErrAlreadyInQueue) {
log.Error("Error adding pullID: %d to the pull requests patch checking queue %v", pr.ID, err)
}
}