summaryrefslogtreecommitdiffstats
path: root/services/pull/check.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/pull/check.go')
-rw-r--r--services/pull/check.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/services/pull/check.go b/services/pull/check.go
index c55b177e1c..1fb167ac21 100644
--- a/services/pull/check.go
+++ b/services/pull/check.go
@@ -13,6 +13,7 @@ import (
"strings"
"code.gitea.io/gitea/models"
+ "code.gitea.io/gitea/models/unit"
"code.gitea.io/gitea/modules/git"
"code.gitea.io/gitea/modules/graceful"
"code.gitea.io/gitea/modules/log"
@@ -139,13 +140,13 @@ func manuallyMerged(pr *models.PullRequest) bool {
return false
}
- if unit, err := pr.BaseRepo.GetUnit(models.UnitTypePullRequests); err == nil {
+ if unit, err := pr.BaseRepo.GetUnit(unit.TypePullRequests); err == nil {
config := unit.PullRequestsConfig()
if !config.AutodetectManualMerge {
return false
}
} else {
- log.Error("PullRequest[%d].BaseRepo.GetUnit(models.UnitTypePullRequests): %v", pr.ID, err)
+ log.Error("PullRequest[%d].BaseRepo.GetUnit(unit.TypePullRequests): %v", pr.ID, err)
return false
}