Skip to content

Commit 0d4058a

Browse files
committed
Set PusherName and PusherID to owner on deploy key
The gitea PushUpdate function requires that the PusherID and PusherName are real users. Signed-off-by: Andrew Thornton <[email protected]>
1 parent 2902b3a commit 0d4058a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmd/serv.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,9 @@ func runServ(c *cli.Context) error {
251251
if err = private.UpdateDeployKeyUpdated(key.ID, repo.ID); err != nil {
252252
fail("Internal error", "UpdateDeployKey: %v", err)
253253
}
254+
255+
os.Setenv(models.EnvPusherName, username)
256+
os.Setenv(models.EnvPusherID, fmt.Sprintf("%d", repo.OwnerID))
254257
} else {
255258
user, err = private.GetUserByKeyID(key.ID)
256259
if err != nil {

0 commit comments

Comments
 (0)