mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-11-04 06:24:11 +01:00 
			
		
		
		
	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:
		
							parent
							
								
									a847d16f5b
								
							
						
					
					
						commit
						be4ec0cbba
					
				@ -23,6 +23,7 @@ const (
 | 
				
			|||||||
	EnvRepoUsername = "GITEA_REPO_USER_NAME"
 | 
						EnvRepoUsername = "GITEA_REPO_USER_NAME"
 | 
				
			||||||
	EnvRepoIsWiki   = "GITEA_REPO_IS_WIKI"
 | 
						EnvRepoIsWiki   = "GITEA_REPO_IS_WIKI"
 | 
				
			||||||
	EnvPusherName   = "GITEA_PUSHER_NAME"
 | 
						EnvPusherName   = "GITEA_PUSHER_NAME"
 | 
				
			||||||
 | 
						EnvPusherEmail  = "GITEA_PUSHER_EMAIL"
 | 
				
			||||||
	EnvPusherID     = "GITEA_PUSHER_ID"
 | 
						EnvPusherID     = "GITEA_PUSHER_ID"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -226,6 +226,11 @@ func HTTP(ctx *context.Context) {
 | 
				
			|||||||
			models.EnvPusherID + fmt.Sprintf("=%d", authUser.ID),
 | 
								models.EnvPusherID + fmt.Sprintf("=%d", authUser.ID),
 | 
				
			||||||
			models.ProtectedBranchRepoID + fmt.Sprintf("=%d", repo.ID),
 | 
								models.ProtectedBranchRepoID + fmt.Sprintf("=%d", repo.ID),
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if !authUser.KeepEmailPrivate {
 | 
				
			||||||
 | 
								environ = append(environ, models.EnvPusherEmail+"="+authUser.Email)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if isWiki {
 | 
							if isWiki {
 | 
				
			||||||
			environ = append(environ, models.EnvRepoIsWiki+"=true")
 | 
								environ = append(environ, models.EnvRepoIsWiki+"=true")
 | 
				
			||||||
		} else {
 | 
							} else {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user