Add email notify for new release (#12463)
* Add email notify for new release Signed-off-by: a1012112796 <1012112796@qq.com>
This commit is contained in:
parent
e429c1164e
commit
e7d65cbc6e
4 changed files with 139 additions and 0 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue