mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-26 02:50:54 +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:
parent
5995326d51
commit
1418288734
8 changed files with 230 additions and 228 deletions
|
@ -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),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue