env var GITEA_PUSHER_EMAIL (#4516)

* env var GITEA_PUSHER_EMAIL

* set pusher email only if email address is not private
This commit is contained in:
Lukas Treyer authored and Lauris BH committed 2018-07-26 19:38:55 +03:00
1 parent a847d16f5b
commit be4ec0cbba
2 files changed
+6

No files matched your search

+5
View File
@@ -226,6 +226,11 @@ func HTTP(ctx *context.Context) {
models.EnvPusherID + fmt.Sprintf("=%d", authUser.ID),
models.ProtectedBranchRepoID + fmt.Sprintf("=%d", repo.ID),
}
if !authUser.KeepEmailPrivate {
environ = append(environ, models.EnvPusherEmail+"="+authUser.Email)
}
if isWiki {
environ = append(environ, models.EnvRepoIsWiki+"=true")
} else {