summaryrefslogtreecommitdiffstats
path: root/modules/notification/base
diff options
context:
space:
mode:
Diffstat (limited to 'modules/notification/base')
-rw-r--r--modules/notification/base/notifier.go14
-rw-r--r--modules/notification/base/null.go9
2 files changed, 6 insertions, 17 deletions
diff --git a/modules/notification/base/notifier.go b/modules/notification/base/notifier.go
index 177864994d..7f5caa3bcc 100644
--- a/modules/notification/base/notifier.go
+++ b/modules/notification/base/notifier.go
@@ -14,14 +14,12 @@ import (
// Notifier defines an interface to notify receiver
type Notifier interface {
Run()
-
- NotifyCreateRepository(doer *user_model.User, u *user_model.User, repo *repo_model.Repository)
- NotifyMigrateRepository(doer *user_model.User, u *user_model.User, repo *repo_model.Repository)
+ NotifyCreateRepository(doer, u *user_model.User, repo *repo_model.Repository)
+ NotifyMigrateRepository(doer, u *user_model.User, repo *repo_model.Repository)
NotifyDeleteRepository(doer *user_model.User, repo *repo_model.Repository)
NotifyForkRepository(doer *user_model.User, oldRepo, repo *repo_model.Repository)
NotifyRenameRepository(doer *user_model.User, repo *repo_model.Repository, oldRepoName string)
NotifyTransferRepository(doer *user_model.User, repo *repo_model.Repository, oldOwnerName string)
-
NotifyNewIssue(issue *models.Issue, mentions []*user_model.User)
NotifyIssueChangeStatus(*user_model.User, *models.Issue, *models.Comment, bool)
NotifyIssueChangeMilestone(doer *user_model.User, issue *models.Issue, oldMilestoneID int64)
@@ -32,8 +30,7 @@ type Notifier interface {
NotifyIssueChangeTitle(doer *user_model.User, issue *models.Issue, oldTitle string)
NotifyIssueChangeRef(doer *user_model.User, issue *models.Issue, oldRef string)
NotifyIssueChangeLabels(doer *user_model.User, issue *models.Issue,
- addedLabels []*models.Label, removedLabels []*models.Label)
-
+ addedLabels, removedLabels []*models.Label)
NotifyNewPullRequest(pr *models.PullRequest, mentions []*user_model.User)
NotifyMergePullRequest(*models.PullRequest, *user_model.User)
NotifyPullRequestSynchronized(doer *user_model.User, pr *models.PullRequest)
@@ -42,23 +39,18 @@ type Notifier interface {
NotifyPullRequestChangeTargetBranch(doer *user_model.User, pr *models.PullRequest, oldBranch string)
NotifyPullRequestPushCommits(doer *user_model.User, pr *models.PullRequest, comment *models.Comment)
NotifyPullRevieweDismiss(doer *user_model.User, review *models.Review, comment *models.Comment)
-
NotifyCreateIssueComment(doer *user_model.User, repo *repo_model.Repository,
issue *models.Issue, comment *models.Comment, mentions []*user_model.User)
NotifyUpdateComment(*user_model.User, *models.Comment, string)
NotifyDeleteComment(*user_model.User, *models.Comment)
-
NotifyNewRelease(rel *models.Release)
NotifyUpdateRelease(doer *user_model.User, rel *models.Release)
NotifyDeleteRelease(doer *user_model.User, rel *models.Release)
-
NotifyPushCommits(pusher *user_model.User, repo *repo_model.Repository, opts *repository.PushUpdateOptions, commits *repository.PushCommits)
NotifyCreateRef(doer *user_model.User, repo *repo_model.Repository, refType, refFullName, refID string)
NotifyDeleteRef(doer *user_model.User, repo *repo_model.Repository, refType, refFullName string)
-
NotifySyncPushCommits(pusher *user_model.User, repo *repo_model.Repository, opts *repository.PushUpdateOptions, commits *repository.PushCommits)
NotifySyncCreateRef(doer *user_model.User, repo *repo_model.Repository, refType, refFullName, refID string)
NotifySyncDeleteRef(doer *user_model.User, repo *repo_model.Repository, refType, refFullName string)
-
NotifyRepoPendingTransfer(doer, newOwner *user_model.User, repo *repo_model.Repository)
}
diff --git a/modules/notification/base/null.go b/modules/notification/base/null.go
index 9524f02f1b..bd52b843a7 100644
--- a/modules/notification/base/null.go
+++ b/modules/notification/base/null.go
@@ -12,12 +12,9 @@ import (
)
// NullNotifier implements a blank notifier
-type NullNotifier struct {
-}
+type NullNotifier struct{}
-var (
- _ Notifier = &NullNotifier{}
-)
+var _ Notifier = &NullNotifier{}
// Run places a place holder function
func (*NullNotifier) Run() {
@@ -118,7 +115,7 @@ func (*NullNotifier) NotifyIssueChangeRef(doer *user_model.User, issue *models.I
// NotifyIssueChangeLabels places a place holder function
func (*NullNotifier) NotifyIssueChangeLabels(doer *user_model.User, issue *models.Issue,
- addedLabels []*models.Label, removedLabels []*models.Label) {
+ addedLabels, removedLabels []*models.Label) {
}
// NotifyCreateRepository places a place holder function