summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--models/update.go1
-rw-r--r--routers/repo/http.go5
2 files changed, 6 insertions, 0 deletions
diff --git a/models/update.go b/models/update.go
index b1bbe0754a..0f71cd1e70 100644
--- a/models/update.go
+++ b/models/update.go
@@ -23,6 +23,7 @@ const (
EnvRepoUsername = "GITEA_REPO_USER_NAME"
EnvRepoIsWiki = "GITEA_REPO_IS_WIKI"
EnvPusherName = "GITEA_PUSHER_NAME"
+ EnvPusherEmail = "GITEA_PUSHER_EMAIL"
EnvPusherID = "GITEA_PUSHER_ID"
)
diff --git a/routers/repo/http.go b/routers/repo/http.go
index e4e26e4f09..1c3453a3a9 100644
--- a/routers/repo/http.go
+++ b/routers/repo/http.go
@@ -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 {