Skip to content

Commit 947d2ee

Browse files
afdev82bkcsoft
authored andcommitted
Fixes go-gitea#316
Export Pusher name as GITEA_PUSHER_NAME env variable Export also GITEA_UUID, but keep the uuid env variable for backward compatibility export pusher name ENV variable go-gitea#316 change env variable prefix to GITEA_ Signed-off-by: Antonio Facciolo <[email protected]> Export also GITEA_UUID go-gitea#316 Keep uuid env variable for backward compatibility
1 parent d07c955 commit 947d2ee

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

cmd/serve.go

+4
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,11 @@ func runServ(c *cli.Context) error {
258258
}
259259
}
260260

261+
os.Setenv("GITEA_PUSHER_NAME", user.Name)
262+
261263
uuid := gouuid.NewV4().String()
264+
os.Setenv("GITEA_UUID", uuid)
265+
// Keep the old env variable name for backward compability
262266
os.Setenv("uuid", uuid)
263267

264268
// Special handle for Windows.

cmd/update.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func runUpdate(c *cli.Context) error {
4949
}
5050

5151
task := models.UpdateTask{
52-
UUID: os.Getenv("uuid"),
52+
UUID: os.Getenv("GITEA_UUID"),
5353
RefName: args[0],
5454
OldCommitID: args[1],
5555
NewCommitID: args[2],

0 commit comments

Comments
 (0)