mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
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>
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user