summaryrefslogtreecommitdiffstats
path: root/modules/notification/notification.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2020-01-10 17:34:21 +0800
committerGitHub <noreply@github.com>2020-01-10 17:34:21 +0800
commit99d869fa63e07780f1a17d1a9599187b9b689d9b (patch)
treeecadeba077cf0ae58d0a21f232d280fec60c779a /modules/notification/notification.go
parent384c2b342ec01fadb520572666127cb5564e1050 (diff)
downloadgitea-99d869fa63e07780f1a17d1a9599187b9b689d9b.tar.gz
gitea-99d869fa63e07780f1a17d1a9599187b9b689d9b.zip
Move push commits from models to modules/repository (#9370)
* Move push commits from models to modules/repository * fix test * fix test * fix test * fix test * fix test Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'modules/notification/notification.go')
-rw-r--r--modules/notification/notification.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/notification/notification.go b/modules/notification/notification.go
index f567552df5..ed7204c9e0 100644
--- a/modules/notification/notification.go
+++ b/modules/notification/notification.go
@@ -13,6 +13,7 @@ import (
"code.gitea.io/gitea/modules/notification/mail"
"code.gitea.io/gitea/modules/notification/ui"
"code.gitea.io/gitea/modules/notification/webhook"
+ "code.gitea.io/gitea/modules/repository"
"code.gitea.io/gitea/modules/setting"
)
@@ -215,7 +216,7 @@ func NotifyRenameRepository(doer *models.User, repo *models.Repository, oldName
}
// NotifyPushCommits notifies commits pushed to notifiers
-func NotifyPushCommits(pusher *models.User, repo *models.Repository, refName, oldCommitID, newCommitID string, commits *models.PushCommits) {
+func NotifyPushCommits(pusher *models.User, repo *models.Repository, refName, oldCommitID, newCommitID string, commits *repository.PushCommits) {
for _, notifier := range notifiers {
notifier.NotifyPushCommits(pusher, repo, refName, oldCommitID, newCommitID, commits)
}
@@ -236,7 +237,7 @@ func NotifyDeleteRef(pusher *models.User, repo *models.Repository, refType, refF
}
// NotifySyncPushCommits notifies commits pushed to notifiers
-func NotifySyncPushCommits(pusher *models.User, repo *models.Repository, refName, oldCommitID, newCommitID string, commits *models.PushCommits) {
+func NotifySyncPushCommits(pusher *models.User, repo *models.Repository, refName, oldCommitID, newCommitID string, commits *repository.PushCommits) {
for _, notifier := range notifiers {
notifier.NotifySyncPushCommits(pusher, repo, refName, oldCommitID, newCommitID, commits)
}