mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 10:18:38 +00:00
Move merge actions to notification (#9024)
* Move merge actions to notification * Add missing mail notification
This commit is contained in:
committed by
techknowlogick
parent
d5261b9aab
commit
d7ac9727bb
@@ -8,6 +8,7 @@ import (
|
||||
"fmt"
|
||||
|
||||
"code.gitea.io/gitea/models"
|
||||
"code.gitea.io/gitea/modules/git"
|
||||
"code.gitea.io/gitea/modules/log"
|
||||
"code.gitea.io/gitea/modules/notification/base"
|
||||
"code.gitea.io/gitea/services/mailer"
|
||||
@@ -98,3 +99,14 @@ func (m *mailNotifier) NotifyIssueChangeAssignee(doer *models.User, issue *model
|
||||
mailer.SendIssueAssignedMail(issue, doer, ct, comment, []string{assignee.Email})
|
||||
}
|
||||
}
|
||||
|
||||
func (m *mailNotifier) NotifyMergePullRequest(pr *models.PullRequest, doer *models.User, baseRepo *git.Repository) {
|
||||
if err := pr.LoadIssue(); err != nil {
|
||||
log.Error("pr.LoadIssue: %v", err)
|
||||
return
|
||||
}
|
||||
|
||||
if err := mailer.MailParticipants(pr.Issue, doer, models.ActionClosePullRequest); err != nil {
|
||||
log.Error("MailParticipants: %v", err)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user