summaryrefslogtreecommitdiffstats
path: root/routers/web/repo/webhook.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/repo/webhook.go')
-rw-r--r--routers/web/repo/webhook.go19
1 files changed, 10 insertions, 9 deletions
diff --git a/routers/web/repo/webhook.go b/routers/web/repo/webhook.go
index a8939e72bd..425198ce24 100644
--- a/routers/web/repo/webhook.go
+++ b/routers/web/repo/webhook.go
@@ -668,15 +668,16 @@ func TestWebhook(ctx *context.Context) {
commitID := commit.ID.String()
p := &api.PushPayload{
- Ref: git.BranchPrefix + ctx.Repo.Repository.DefaultBranch,
- Before: commitID,
- After: commitID,
- CompareURL: setting.AppURL + ctx.Repo.Repository.ComposeCompareURL(commitID, commitID),
- Commits: []*api.PayloadCommit{apiCommit},
- HeadCommit: apiCommit,
- Repo: convert.ToRepo(ctx.Repo.Repository, perm.AccessModeNone),
- Pusher: apiUser,
- Sender: apiUser,
+ Ref: git.BranchPrefix + ctx.Repo.Repository.DefaultBranch,
+ Before: commitID,
+ After: commitID,
+ CompareURL: setting.AppURL + ctx.Repo.Repository.ComposeCompareURL(commitID, commitID),
+ Commits: []*api.PayloadCommit{apiCommit},
+ TotalCommits: 1,
+ HeadCommit: apiCommit,
+ Repo: convert.ToRepo(ctx.Repo.Repository, perm.AccessModeNone),
+ Pusher: apiUser,
+ Sender: apiUser,
}
if err := webhook_service.PrepareWebhook(w, ctx.Repo.Repository, webhook.HookEventPush, p); err != nil {
ctx.Flash.Error("PrepareWebhook: " + err.Error())