Browse Source

env var GITEA_PUSHER_EMAIL (#4516)

* env var GITEA_PUSHER_EMAIL

* set pusher email only if email address is not private
tags/v1.6.0-dev
Lukas Treyer 5 years ago
parent
commit
be4ec0cbba
2 changed files with 6 additions and 0 deletions
  1. 1
    0
      models/update.go
  2. 5
    0
      routers/repo/http.go

+ 1
- 0
models/update.go View File

@@ -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"
)


+ 5
- 0
routers/repo/http.go 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 {

Loading…
Cancel
Save