diff --git a/src/applications/diffusion/engine/DiffusionCommitHookEngine.php b/src/applications/diffusion/engine/DiffusionCommitHookEngine.php --- 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 @@ $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 --- a/src/docs/user/userguide/diffusion_hooks.diviner +++ b/src/docs/user/userguide/diffusion_hooks.diviner @@ -42,7 +42,7 @@ 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.