summaryrefslogtreecommitdiffstats
path: root/modules/notification/webhook/webhook.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/notification/webhook/webhook.go')
-rw-r--r--modules/notification/webhook/webhook.go38
1 files changed, 20 insertions, 18 deletions
diff --git a/modules/notification/webhook/webhook.go b/modules/notification/webhook/webhook.go
index 0eb2099a20..b93e90368a 100644
--- a/modules/notification/webhook/webhook.go
+++ b/modules/notification/webhook/webhook.go
@@ -645,15 +645,16 @@ func (m *webhookNotifier) NotifyPushCommits(pusher *user_model.User, repo *repo_
}
if err := webhook_services.PrepareWebhooks(repo, webhook.HookEventPush, &api.PushPayload{
- Ref: opts.RefFullName,
- Before: opts.OldCommitID,
- After: opts.NewCommitID,
- CompareURL: setting.AppURL + commits.CompareURL,
- Commits: apiCommits,
- HeadCommit: apiHeadCommit,
- Repo: convert.ToRepo(repo, perm.AccessModeOwner),
- Pusher: apiPusher,
- Sender: apiPusher,
+ Ref: opts.RefFullName,
+ Before: opts.OldCommitID,
+ After: opts.NewCommitID,
+ CompareURL: setting.AppURL + commits.CompareURL,
+ Commits: apiCommits,
+ TotalCommits: commits.Len,
+ HeadCommit: apiHeadCommit,
+ Repo: convert.ToRepo(repo, perm.AccessModeOwner),
+ Pusher: apiPusher,
+ Sender: apiPusher,
}); err != nil {
log.Error("PrepareWebhooks: %v", err)
}
@@ -875,15 +876,16 @@ func (m *webhookNotifier) NotifySyncPushCommits(pusher *user_model.User, repo *r
}
if err := webhook_services.PrepareWebhooks(repo, webhook.HookEventPush, &api.PushPayload{
- Ref: opts.RefFullName,
- Before: opts.OldCommitID,
- After: opts.NewCommitID,
- CompareURL: setting.AppURL + commits.CompareURL,
- Commits: apiCommits,
- HeadCommit: apiHeadCommit,
- Repo: convert.ToRepo(repo, perm.AccessModeOwner),
- Pusher: apiPusher,
- Sender: apiPusher,
+ Ref: opts.RefFullName,
+ Before: opts.OldCommitID,
+ After: opts.NewCommitID,
+ CompareURL: setting.AppURL + commits.CompareURL,
+ Commits: apiCommits,
+ TotalCommits: commits.Len,
+ HeadCommit: apiHeadCommit,
+ Repo: convert.ToRepo(repo, perm.AccessModeOwner),
+ Pusher: apiPusher,
+ Sender: apiPusher,
}); err != nil {
log.Error("PrepareWebhooks: %v", err)
}