aboutsummaryrefslogtreecommitdiffstats
path: root/models/pull.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2021-11-10 03:57:58 +0800
committerGitHub <noreply@github.com>2021-11-09 20:57:58 +0100
commit99b2858e628d92bba252be72def409af77af735b (patch)
tree56159cf10b271307911e6f01626c0c3efba789ab /models/pull.go
parentb6b1e716654fec3b16d245ef65cf42e57e1bb5b6 (diff)
downloadgitea-99b2858e628d92bba252be72def409af77af735b.tar.gz
gitea-99b2858e628d92bba252be72def409af77af735b.zip
Move unit into models/unit/ (#17576)
* Move unit into models/unit/ * Rename unit.UnitType as unit.Type
Diffstat (limited to 'models/pull.go')
-rw-r--r--models/pull.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/models/pull.go b/models/pull.go
index 38f2c1b8ce..6bcc30e901 100644
--- a/models/pull.go
+++ b/models/pull.go
@@ -11,6 +11,7 @@ import (
"strings"
"code.gitea.io/gitea/models/db"
+ "code.gitea.io/gitea/models/unit"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/timeutil"
@@ -236,7 +237,7 @@ func (pr *PullRequest) GetDefaultMergeMessage() string {
}
issueReference := "#"
- if pr.BaseRepo.UnitEnabled(UnitTypeExternalTracker) {
+ if pr.BaseRepo.UnitEnabled(unit.TypeExternalTracker) {
issueReference = "!"
}
@@ -338,7 +339,7 @@ func (pr *PullRequest) GetDefaultSquashMessage() string {
log.Error("LoadBaseRepo: %v", err)
return ""
}
- if pr.BaseRepo.UnitEnabled(UnitTypeExternalTracker) {
+ if pr.BaseRepo.UnitEnabled(unit.TypeExternalTracker) {
return fmt.Sprintf("%s (!%d)", pr.Issue.Title, pr.Issue.Index)
}
return fmt.Sprintf("%s (#%d)", pr.Issue.Title, pr.Issue.Index)