Changeset View
Changeset View
Standalone View
Standalone View
src/docs/user/userguide/diffusion_hooks.diviner
Show All 36 Lines | - They'll be passed the arguments and environment that normal hooks are | ||||
passed. | passed. | ||||
- They should emit output and return codes like normal hooks do. | - They should emit output and return codes like normal hooks do. | ||||
- These hooks will run only after all the Herald rules have passed and | - These hooks will run only after all the Herald rules have passed and | ||||
Phabricator is otherwise ready to accept the commit or push. | Phabricator is otherwise ready to accept the commit or push. | ||||
These additional variables will be available in the environment, in addition | These additional variables will be available in the environment, in addition | ||||
to the variables the VCS normally provides: | 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. | executing for. | ||||
- `PHABRICATOR_USER` The Phabricator username that the session is | - `PHABRICATOR_USER` The Phabricator username that the session is | ||||
authenticated under. | authenticated under. | ||||
- `PHABRICATOR_REMOTE_ADDRESS` The connection's remote address (that is, | - `PHABRICATOR_REMOTE_ADDRESS` The connection's remote address (that is, | ||||
the IP address of whoever is pushing or committing). | the IP address of whoever is pushing or committing). | ||||
- `PHABRICATOR_REMOTE_PROTOCOL` The protocol the connection is using (for | - `PHABRICATOR_REMOTE_PROTOCOL` The protocol the connection is using (for | ||||
example, "ssh" or "http"). | example, "ssh" or "http"). |