mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-25 11:22:16 +00:00
Refactor: Move PushUpdateOptions (#13363)
Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
This commit is contained in:
parent
dd12384f22
commit
4df2ed29f2
15 changed files with 169 additions and 146 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue