aboutsummaryrefslogtreecommitdiffstats
path: root/modules/notification/notification.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/notification/notification.go')
-rw-r--r--modules/notification/notification.go49
1 files changed, 28 insertions, 21 deletions
diff --git a/modules/notification/notification.go b/modules/notification/notification.go
index fdfcc62ffe..fa0b280e71 100644
--- a/modules/notification/notification.go
+++ b/modules/notification/notification.go
@@ -101,27 +101,6 @@ func NotifyDeleteComment(doer *models.User, c *models.Comment) {
}
}
-// NotifyDeleteRepository notifies delete repository to notifiers
-func NotifyDeleteRepository(doer *models.User, repo *models.Repository) {
- for _, notifier := range notifiers {
- notifier.NotifyDeleteRepository(doer, repo)
- }
-}
-
-// NotifyForkRepository notifies fork repository to notifiers
-func NotifyForkRepository(doer *models.User, oldRepo, repo *models.Repository) {
- for _, notifier := range notifiers {
- notifier.NotifyForkRepository(doer, oldRepo, repo)
- }
-}
-
-// NotifyRenameRepository notifies repository renamed
-func NotifyRenameRepository(doer *models.User, repo *models.Repository, oldName string) {
- for _, notifier := range notifiers {
- notifier.NotifyRenameRepository(doer, repo, oldName)
- }
-}
-
// NotifyNewRelease notifies new release to notifiers
func NotifyNewRelease(rel *models.Release) {
for _, notifier := range notifiers {
@@ -200,6 +179,34 @@ func NotifyMigrateRepository(doer *models.User, u *models.User, repo *models.Rep
}
}
+// NotifyTransferRepository notifies create repository to notifiers
+func NotifyTransferRepository(doer *models.User, repo *models.Repository, newOwnerName string) {
+ for _, notifier := range notifiers {
+ notifier.NotifyTransferRepository(doer, repo, newOwnerName)
+ }
+}
+
+// NotifyDeleteRepository notifies delete repository to notifiers
+func NotifyDeleteRepository(doer *models.User, repo *models.Repository) {
+ for _, notifier := range notifiers {
+ notifier.NotifyDeleteRepository(doer, repo)
+ }
+}
+
+// NotifyForkRepository notifies fork repository to notifiers
+func NotifyForkRepository(doer *models.User, oldRepo, repo *models.Repository) {
+ for _, notifier := range notifiers {
+ notifier.NotifyForkRepository(doer, oldRepo, repo)
+ }
+}
+
+// NotifyRenameRepository notifies repository renamed
+func NotifyRenameRepository(doer *models.User, repo *models.Repository, oldName string) {
+ for _, notifier := range notifiers {
+ notifier.NotifyRenameRepository(doer, repo, oldName)
+ }
+}
+
// 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 {