diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2020-10-31 05:59:02 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-30 22:59:02 +0100 |
commit | 4df2ed29f28194513c59733e369152b8f8bc1d36 (patch) | |
tree | 3bb0604e902390f37e2c9a8104f4ccaf495b4291 /modules/notification/base | |
parent | dd12384f224e98a130511ebc9ffcfb44ead0e736 (diff) | |
download | gitea-4df2ed29f28194513c59733e369152b8f8bc1d36.tar.gz gitea-4df2ed29f28194513c59733e369152b8f8bc1d36.zip |
Refactor: Move PushUpdateOptions (#13363)
Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
Diffstat (limited to 'modules/notification/base')
-rw-r--r-- | modules/notification/base/notifier.go | 4 | ||||
-rw-r--r-- | modules/notification/base/null.go | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/modules/notification/base/notifier.go b/modules/notification/base/notifier.go index 5cd2b4c060..7b8eb7b1f1 100644 --- a/modules/notification/base/notifier.go +++ b/modules/notification/base/notifier.go @@ -48,11 +48,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 *repository.PushCommits) + NotifyPushCommits(pusher *models.User, repo *models.Repository, opts *repository.PushUpdateOptions, 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 *repository.PushCommits) + NotifySyncPushCommits(pusher *models.User, repo *models.Repository, opts *repository.PushUpdateOptions, 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 15d06ec856..7a9ad0b2ce 100644 --- a/modules/notification/base/null.go +++ b/modules/notification/base/null.go @@ -128,7 +128,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 *repository.PushCommits) { +func (*NullNotifier) NotifyPushCommits(pusher *models.User, repo *models.Repository, opts *repository.PushUpdateOptions, commits *repository.PushCommits) { } // NotifyCreateRef notifies branch or tag creation to notifiers @@ -148,7 +148,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 *repository.PushCommits) { +func (*NullNotifier) NotifySyncPushCommits(pusher *models.User, repo *models.Repository, opts *repository.PushUpdateOptions, commits *repository.PushCommits) { } // NotifySyncCreateRef places a place holder function |