aboutsummaryrefslogtreecommitdiff
path: root/internal/route/repo
diff options
context:
space:
mode:
authorJoe Chen <jc@unknwon.io>2022-10-23 19:15:14 +0800
committerGitHub <noreply@github.com>2022-10-23 19:15:14 +0800
commitc58c89362161718e1079b9d43c0ce984bb1506cc (patch)
tree14a54295b60b4c2887f06bfde8b7e603e0f4d6dd /internal/route/repo
parentef0388045f8fd35a40b3404deb3caa1a37e103f7 (diff)
refactor(db): migrate password methods off `user.go` (#7205)
Diffstat (limited to 'internal/route/repo')
-rw-r--r--internal/route/repo/webhook.go9
1 files changed, 7 insertions, 2 deletions
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{}