summaryrefslogtreecommitdiffstats
path: root/modules/notification/notification.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2020-10-31 05:59:02 +0800
committerGitHub <noreply@github.com>2020-10-30 22:59:02 +0100
commit4df2ed29f28194513c59733e369152b8f8bc1d36 (patch)
tree3bb0604e902390f37e2c9a8104f4ccaf495b4291 /modules/notification/notification.go
parentdd12384f224e98a130511ebc9ffcfb44ead0e736 (diff)
downloadgitea-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/notification.go')
-rw-r--r--modules/notification/notification.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/notification/notification.go b/modules/notification/notification.go
index 57f1e7c16d..21f9dc87a8 100644
--- a/modules/notification/notification.go
+++ b/modules/notification/notification.go
@@ -236,9 +236,9 @@ 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 *repository.PushCommits) {
+func NotifyPushCommits(pusher *models.User, repo *models.Repository, opts *repository.PushUpdateOptions, commits *repository.PushCommits) {
for _, notifier := range notifiers {
- notifier.NotifyPushCommits(pusher, repo, refName, oldCommitID, newCommitID, commits)
+ notifier.NotifyPushCommits(pusher, repo, opts, commits)
}
}
@@ -257,9 +257,9 @@ 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 *repository.PushCommits) {
+func NotifySyncPushCommits(pusher *models.User, repo *models.Repository, opts *repository.PushUpdateOptions, commits *repository.PushCommits) {
for _, notifier := range notifiers {
- notifier.NotifySyncPushCommits(pusher, repo, refName, oldCommitID, newCommitID, commits)
+ notifier.NotifySyncPushCommits(pusher, repo, opts, commits)
}
}