From c58c89362161718e1079b9d43c0ce984bb1506cc Mon Sep 17 00:00:00 2001 From: Joe Chen <jc@unknwon.io> Date: Sun, 23 Oct 2022 19:15:14 +0800 Subject: refactor(db): migrate password methods off `user.go` (#7205) --- internal/route/repo/webhook.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'internal/route/repo') diff --git a/internal/route/repo/webhook.go b/internal/route/repo/webhook.go index 3ccb205e..f52e80c0 100644 --- a/internal/route/repo/webhook.go +++ b/internal/route/repo/webhook.go @@ -9,6 +9,7 @@ import ( "net/http" "net/url" "strings" + "time" "github.com/gogs/git-module" api "github.com/gogs/go-gogs-client" @@ -475,8 +476,12 @@ func TestWebhook(c *context.Context) { commitID = git.EmptyID commitMessage = "This is a fake commit" ghost := db.NewGhostUser() - author = ghost.NewGitSig() - committer = ghost.NewGitSig() + author = &git.Signature{ + Name: ghost.DisplayName(), + Email: ghost.Email, + When: time.Now(), + } + committer = author authorUsername = ghost.Name committerUsername = ghost.Name nameStatus = &git.NameStatus{} -- cgit v1.2.3