mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
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 ;)
This commit is contained in:
@@ -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),
|
||||
|
Reference in New Issue
Block a user