summaryrefslogtreecommitdiffstats
path: root/modules/notification/notification.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2019-11-03 14:59:26 +0800
committerGitHub <noreply@github.com>2019-11-03 14:59:26 +0800
commit022d2d8beb6297016ed26b0090c6a4a4ac404437 (patch)
treeaa6ca5fa9415661d02e97b66251166d456efa18e /modules/notification/notification.go
parentfe7a6d9bfcbcf53bfe2d24f4d8e7463c897b9389 (diff)
downloadgitea-022d2d8beb6297016ed26b0090c6a4a4ac404437.tar.gz
gitea-022d2d8beb6297016ed26b0090c6a4a4ac404437.zip
Move push commits events to notification (#8783)
* Move push commits events to notification * Update modules/notification/base/null.go Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
Diffstat (limited to 'modules/notification/notification.go')
-rw-r--r--modules/notification/notification.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/notification/notification.go b/modules/notification/notification.go
index 70b1541e35..6532f9d614 100644
--- a/modules/notification/notification.go
+++ b/modules/notification/notification.go
@@ -183,3 +183,10 @@ func NotifyMigrateRepository(doer *models.User, u *models.User, repo *models.Rep
notifier.NotifyMigrateRepository(doer, u, repo)
}
}
+
+// NotifyPushCommits notifies commits pushed to notifiers
+func NotifyPushCommits(pusher *models.User, repo *models.Repository, refName, oldCommitID, newCommitID string, commits *models.PushCommits) {
+ for _, notifier := range notifiers {
+ notifier.NotifyPushCommits(pusher, repo, refName, oldCommitID, newCommitID, commits)
+ }
+}