diff options
Diffstat (limited to 'modules/notification/mail/mail.go')
-rw-r--r-- | modules/notification/mail/mail.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/notification/mail/mail.go b/modules/notification/mail/mail.go index 795c8af2c8..9b2c27280f 100644 --- a/modules/notification/mail/mail.go +++ b/modules/notification/mail/mail.go @@ -145,3 +145,16 @@ func (m *mailNotifier) NotifyPullRequestPushCommits(doer *models.User, pr *model m.NotifyCreateIssueComment(doer, comment.Issue.Repo, comment.Issue, comment) } + +func (m *mailNotifier) NotifyNewRelease(rel *models.Release) { + if err := rel.LoadAttributes(); err != nil { + log.Error("NotifyNewRelease: %v", err) + return + } + + if rel.IsDraft || rel.IsPrerelease { + return + } + + mailer.MailNewRelease(rel) +} |