mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-11-03 20:36:07 +01:00 
			
		
		
		
	Stop running hooks on pr merge (#6963)
* Stop running hooks on pr merge * Remove SSH_ORIGINAL_COMMAND from the pushing environment
This commit is contained in:
		@@ -19,6 +19,8 @@ func PushingEnvironment(doer *User, repo *Repository) []string {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	sig := doer.NewGitSig()
 | 
						sig := doer.NewGitSig()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// We should add "SSH_ORIGINAL_COMMAND=gitea-internal",
 | 
				
			||||||
 | 
						// once we have hook and pushing infrastructure working correctly
 | 
				
			||||||
	return append(os.Environ(),
 | 
						return append(os.Environ(),
 | 
				
			||||||
		"GIT_AUTHOR_NAME="+sig.Name,
 | 
							"GIT_AUTHOR_NAME="+sig.Name,
 | 
				
			||||||
		"GIT_AUTHOR_EMAIL="+sig.Email,
 | 
							"GIT_AUTHOR_EMAIL="+sig.Email,
 | 
				
			||||||
@@ -30,7 +32,6 @@ func PushingEnvironment(doer *User, repo *Repository) []string {
 | 
				
			|||||||
		EnvPusherName+"="+doer.Name,
 | 
							EnvPusherName+"="+doer.Name,
 | 
				
			||||||
		EnvPusherID+"="+fmt.Sprintf("%d", doer.ID),
 | 
							EnvPusherID+"="+fmt.Sprintf("%d", doer.ID),
 | 
				
			||||||
		ProtectedBranchRepoID+"="+fmt.Sprintf("%d", repo.ID),
 | 
							ProtectedBranchRepoID+"="+fmt.Sprintf("%d", repo.ID),
 | 
				
			||||||
		"SSH_ORIGINAL_COMMAND=gitea-internal",
 | 
					 | 
				
			||||||
	)
 | 
						)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user