Refactor mail notification (#5110)

* mail notification implement interface

* fix file comment year

* use NullNotifier as parent struct of notifiers
This commit is contained in:
Lunny Xiao 2019-01-13 22:42:55 +08:00 committed by Lauris BH
parent e5228b8369
commit beab2df122
8 changed files with 190 additions and 55 deletions

View file

@ -13,6 +13,7 @@ import (
type (
notificationService struct {
base.NullNotifier
issueQueue chan issueNotificationOpts
}
@ -86,49 +87,3 @@ func (ns *notificationService) NotifyPullRequestReview(pr *models.PullRequest, r
r.Reviewer.ID,
}
}
func (ns *notificationService) NotifyUpdateComment(doer *models.User, c *models.Comment, oldContent string) {
}
func (ns *notificationService) NotifyDeleteComment(doer *models.User, c *models.Comment) {
}
func (ns *notificationService) NotifyDeleteRepository(doer *models.User, repo *models.Repository) {
}
func (ns *notificationService) NotifyForkRepository(doer *models.User, oldRepo, repo *models.Repository) {
}
func (ns *notificationService) NotifyNewRelease(rel *models.Release) {
}
func (ns *notificationService) NotifyUpdateRelease(doer *models.User, rel *models.Release) {
}
func (ns *notificationService) NotifyDeleteRelease(doer *models.User, rel *models.Release) {
}
func (ns *notificationService) NotifyIssueChangeMilestone(doer *models.User, issue *models.Issue) {
}
func (ns *notificationService) NotifyIssueChangeContent(doer *models.User, issue *models.Issue, oldContent string) {
}
func (ns *notificationService) NotifyIssueChangeAssignee(doer *models.User, issue *models.Issue, removed bool) {
}
func (ns *notificationService) NotifyIssueClearLabels(doer *models.User, issue *models.Issue) {
}
func (ns *notificationService) NotifyIssueChangeTitle(doer *models.User, issue *models.Issue, oldTitle string) {
}
func (ns *notificationService) NotifyIssueChangeLabels(doer *models.User, issue *models.Issue,
addedLabels []*models.Label, removedLabels []*models.Label) {
}
func (ns *notificationService) NotifyCreateRepository(doer *models.User, u *models.User, repo *models.Repository) {
}
func (ns *notificationService) NotifyMigrateRepository(doer *models.User, u *models.User, repo *models.Repository) {
}