From 99b2858e628d92bba252be72def409af77af735b Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Wed, 10 Nov 2021 03:57:58 +0800 Subject: Move unit into models/unit/ (#17576) * Move unit into models/unit/ * Rename unit.UnitType as unit.Type --- services/mailer/mail_issue.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'services/mailer') diff --git a/services/mailer/mail_issue.go b/services/mailer/mail_issue.go index 6f401e5f92..6e63162713 100644 --- a/services/mailer/mail_issue.go +++ b/services/mailer/mail_issue.go @@ -8,6 +8,7 @@ import ( "fmt" "code.gitea.io/gitea/models" + "code.gitea.io/gitea/models/unit" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" ) @@ -114,9 +115,9 @@ func mailIssueCommentToParticipants(ctx *mailCommentContext, mentions []*models. } func mailIssueCommentBatch(ctx *mailCommentContext, users []*models.User, visited map[int64]bool, fromMention bool) error { - checkUnit := models.UnitTypeIssues + checkUnit := unit.TypeIssues if ctx.Issue.IsPull { - checkUnit = models.UnitTypePullRequests + checkUnit = unit.TypePullRequests } langMap := make(map[string][]*models.User) -- cgit v1.2.3