summaryrefslogtreecommitdiffstats
path: root/modules/notification/base
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/base
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/base')
-rw-r--r--modules/notification/base/notifier.go5
-rw-r--r--modules/notification/base/null.go5
2 files changed, 6 insertions, 4 deletions
diff --git a/modules/notification/base/notifier.go b/modules/notification/base/notifier.go
index 48846b3446..12fde1737d 100644
--- a/modules/notification/base/notifier.go
+++ b/modules/notification/base/notifier.go
@@ -7,6 +7,7 @@ package base
import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/git"
+ "code.gitea.io/gitea/modules/repository"
)
// Notifier defines an interface to notify receiver
@@ -45,11 +46,11 @@ type Notifier interface {
NotifyUpdateRelease(doer *models.User, rel *models.Release)
NotifyDeleteRelease(doer *models.User, rel *models.Release)
- NotifyPushCommits(pusher *models.User, repo *models.Repository, refName, oldCommitID, newCommitID string, commits *models.PushCommits)
+ NotifyPushCommits(pusher *models.User, repo *models.Repository, refName, oldCommitID, newCommitID string, commits *repository.PushCommits)
NotifyCreateRef(doer *models.User, repo *models.Repository, refType, refFullName string)
NotifyDeleteRef(doer *models.User, repo *models.Repository, refType, refFullName string)
- NotifySyncPushCommits(pusher *models.User, repo *models.Repository, refName, oldCommitID, newCommitID string, commits *models.PushCommits)
+ NotifySyncPushCommits(pusher *models.User, repo *models.Repository, refName, oldCommitID, newCommitID string, commits *repository.PushCommits)
NotifySyncCreateRef(doer *models.User, repo *models.Repository, refType, refFullName string)
NotifySyncDeleteRef(doer *models.User, repo *models.Repository, refType, refFullName string)
}
diff --git a/modules/notification/base/null.go b/modules/notification/base/null.go
index bea4e55277..1f90f6519d 100644
--- a/modules/notification/base/null.go
+++ b/modules/notification/base/null.go
@@ -7,6 +7,7 @@ package base
import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/git"
+ "code.gitea.io/gitea/modules/repository"
)
// NullNotifier implements a blank notifier
@@ -116,7 +117,7 @@ func (*NullNotifier) NotifyMigrateRepository(doer *models.User, u *models.User,
}
// NotifyPushCommits notifies commits pushed to notifiers
-func (*NullNotifier) NotifyPushCommits(pusher *models.User, repo *models.Repository, refName, oldCommitID, newCommitID string, commits *models.PushCommits) {
+func (*NullNotifier) NotifyPushCommits(pusher *models.User, repo *models.Repository, refName, oldCommitID, newCommitID string, commits *repository.PushCommits) {
}
// NotifyCreateRef notifies branch or tag creation to notifiers
@@ -136,7 +137,7 @@ func (*NullNotifier) NotifyTransferRepository(doer *models.User, repo *models.Re
}
// NotifySyncPushCommits places a place holder function
-func (*NullNotifier) NotifySyncPushCommits(pusher *models.User, repo *models.Repository, refName, oldCommitID, newCommitID string, commits *models.PushCommits) {
+func (*NullNotifier) NotifySyncPushCommits(pusher *models.User, repo *models.Repository, refName, oldCommitID, newCommitID string, commits *repository.PushCommits) {
}
// NotifySyncCreateRef places a place holder function