summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/repo/hook.go
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2020-09-18 14:09:26 +0200
committerGitHub <noreply@github.com>2020-09-18 20:09:26 +0800
commit1418288734b430330023e4e17747175e4fea2f41 (patch)
tree270f7bdbb6aee5f732a6d1295ce3d021d3e98874 /routers/api/v1/repo/hook.go
parent5995326d51ab42014c6d77d3313233641c258318 (diff)
downloadgitea-1418288734b430330023e4e17747175e4fea2f41.tar.gz
gitea-1418288734b430330023e4e17747175e4fea2f41.zip
Refactor: move Commit To APIFormat Code & Lot of StopWatch related things (#12729)
* move GitCommit to APIFormat convertion into convert package * rename Commit convert functions * move stopwatch to api convertion into convert package & rm unused code & extend test * fix compare time * Gitea not Gogs ;)
Diffstat (limited to 'routers/api/v1/repo/hook.go')
-rw-r--r--routers/api/v1/repo/hook.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/api/v1/repo/hook.go b/routers/api/v1/repo/hook.go
index 3758493344..1a38fc3018 100644
--- a/routers/api/v1/repo/hook.go
+++ b/routers/api/v1/repo/hook.go
@@ -144,7 +144,7 @@ func TestHook(ctx *context.APIContext) {
Before: ctx.Repo.Commit.ID.String(),
After: ctx.Repo.Commit.ID.String(),
Commits: []*api.PayloadCommit{
- convert.ToCommit(ctx.Repo.Repository, ctx.Repo.Commit),
+ convert.ToPayloadCommit(ctx.Repo.Repository, ctx.Repo.Commit),
},
Repo: ctx.Repo.Repository.APIFormat(models.AccessModeNone),
Pusher: convert.ToUser(ctx.User, ctx.IsSigned, false),