summaryrefslogtreecommitdiffstats
path: root/modules/notification/mail/mail.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/notification/mail/mail.go')
-rw-r--r--modules/notification/mail/mail.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/modules/notification/mail/mail.go b/modules/notification/mail/mail.go
index 0927e182c1..5bfb0b3ef8 100644
--- a/modules/notification/mail/mail.go
+++ b/modules/notification/mail/mail.go
@@ -73,6 +73,18 @@ func (m *mailNotifier) NotifyIssueChangeStatus(doer *models.User, issue *models.
}
}
+func (m *mailNotifier) NotifyIssueChangeTitle(doer *models.User, issue *models.Issue, oldTitle string) {
+ if err := issue.LoadPullRequest(); err != nil {
+ log.Error("issue.LoadPullRequest: %v", err)
+ return
+ }
+ if issue.IsPull && models.HasWorkInProgressPrefix(oldTitle) && !issue.PullRequest.IsWorkInProgress() {
+ if err := mailer.MailParticipants(issue, doer, models.ActionPullRequestReadyForReview, nil); err != nil {
+ log.Error("MailParticipants: %v", err)
+ }
+ }
+}
+
func (m *mailNotifier) NotifyNewPullRequest(pr *models.PullRequest, mentions []*models.User) {
if err := mailer.MailParticipants(pr.Issue, pr.Issue.Poster, models.ActionCreatePullRequest, mentions); err != nil {
log.Error("MailParticipants: %v", err)