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/action/action.go | |
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/action/action.go')
-rw-r--r-- | modules/notification/action/action.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/notification/action/action.go b/modules/notification/action/action.go index f7078d3493..3c61cceb99 100644 --- a/modules/notification/action/action.go +++ b/modules/notification/action/action.go @@ -275,7 +275,7 @@ func (*actionNotifier) NotifyMergePullRequest(pr *models.PullRequest, doer *mode } } -func (a *actionNotifier) NotifySyncPushCommits(pusher *models.User, repo *models.Repository, refName, oldCommitID, newCommitID string, commits *repository.PushCommits) { +func (a *actionNotifier) NotifySyncPushCommits(pusher *models.User, repo *models.Repository, opts *repository.PushUpdateOptions, commits *repository.PushCommits) { data, err := json.Marshal(commits) if err != nil { log.Error("json.Marshal: %v", err) @@ -289,7 +289,7 @@ func (a *actionNotifier) NotifySyncPushCommits(pusher *models.User, repo *models RepoID: repo.ID, Repo: repo, IsPrivate: repo.IsPrivate, - RefName: refName, + RefName: opts.RefFullName, Content: string(data), }); err != nil { log.Error("notifyWatchers: %v", err) |