Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/ssh/DiffusionSSHWorkflow.php
| Show All 24 Lines | abstract class DiffusionSSHWorkflow extends PhabricatorSSHWorkflow { | ||||
| } | } | ||||
| public function getEnvironment() { | public function getEnvironment() { | ||||
| $env = array( | $env = array( | ||||
| DiffusionCommitHookEngine::ENV_USER => $this->getSSHUser()->getUsername(), | DiffusionCommitHookEngine::ENV_USER => $this->getSSHUser()->getUsername(), | ||||
| DiffusionCommitHookEngine::ENV_REMOTE_PROTOCOL => 'ssh', | DiffusionCommitHookEngine::ENV_REMOTE_PROTOCOL => 'ssh', | ||||
| ); | ); | ||||
| $identifier = $this->getRequestIdentifier(); | |||||
| if ($identifier !== null) { | |||||
| $env[DiffusionCommitHookEngine::ENV_REQUEST] = $identifier; | |||||
| } | |||||
| $remote_address = $this->getSSHRemoteAddress(); | $remote_address = $this->getSSHRemoteAddress(); | ||||
| if ($remote_address !== null) { | if ($remote_address !== null) { | ||||
| $env[DiffusionCommitHookEngine::ENV_REMOTE_ADDRESS] = $remote_address; | $env[DiffusionCommitHookEngine::ENV_REMOTE_ADDRESS] = $remote_address; | ||||
| } | } | ||||
| return $env; | return $env; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 240 Lines • Show Last 20 Lines | |||||