diff --git a/src/applications/diffusion/engine/DiffusionCommitHookEngine.php b/src/applications/diffusion/engine/DiffusionCommitHookEngine.php index 741b21bd19..53dc417be4 100644 --- a/src/applications/diffusion/engine/DiffusionCommitHookEngine.php +++ b/src/applications/diffusion/engine/DiffusionCommitHookEngine.php @@ -10,6 +10,7 @@ */ final class DiffusionCommitHookEngine extends Phobject { + const ENV_REPOSITORY = 'PHABRICATOR_REPOSITORY'; const ENV_USER = 'PHABRICATOR_USER'; const ENV_REMOTE_ADDRESS = 'PHABRICATOR_REMOTE_ADDRESS'; const ENV_REMOTE_PROTOCOL = 'PHABRICATOR_REMOTE_PROTOCOL'; @@ -610,7 +611,7 @@ final class DiffusionCommitHookEngine extends Phobject { $console = PhutilConsole::getConsole(); $env = array( - 'PHABRICATOR_REPOSITORY' => $this->getRepository()->getCallsign(), + self::ENV_REPOSITORY => $this->getRepository()->getPHID(), self::ENV_USER => $this->getViewer()->getUsername(), self::ENV_REMOTE_PROTOCOL => $this->getRemoteProtocol(), self::ENV_REMOTE_ADDRESS => $this->getRemoteAddress(), diff --git a/src/docs/user/userguide/diffusion_hooks.diviner b/src/docs/user/userguide/diffusion_hooks.diviner index db52c0667d..54c93a933b 100644 --- a/src/docs/user/userguide/diffusion_hooks.diviner +++ b/src/docs/user/userguide/diffusion_hooks.diviner @@ -42,7 +42,7 @@ These hooks act like normal `pre-commit` or `pre-receive` hooks: These additional variables will be available in the environment, in addition to the variables the VCS normally provides: - - `PHABRICATOR_REPOSITORY` The callsign of the repository the hook is + - `PHABRICATOR_REPOSITORY` The PHID of the repository the hook is executing for. - `PHABRICATOR_USER` The Phabricator username that the session is authenticated under.