summaryrefslogtreecommitdiffstats
path: root/modules/notification/notification.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/notification/notification.go')
-rw-r--r--modules/notification/notification.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/modules/notification/notification.go b/modules/notification/notification.go
index a5e450ee66..5ac09a72e5 100644
--- a/modules/notification/notification.go
+++ b/modules/notification/notification.go
@@ -199,3 +199,17 @@ func NotifyPushCommits(pusher *models.User, repo *models.Repository, refName, ol
notifier.NotifyPushCommits(pusher, repo, refName, oldCommitID, newCommitID, commits)
}
}
+
+// NotifyCreateRef notifies branch or tag creation to notifiers
+func NotifyCreateRef(pusher *models.User, repo *models.Repository, refType, refFullName string) {
+ for _, notifier := range notifiers {
+ notifier.NotifyCreateRef(pusher, repo, refType, refFullName)
+ }
+}
+
+// NotifyDeleteRef notifies branch or tag deletion to notifiers
+func NotifyDeleteRef(pusher *models.User, repo *models.Repository, refType, refFullName string) {
+ for _, notifier := range notifiers {
+ notifier.NotifyDeleteRef(pusher, repo, refType, refFullName)
+ }
+}