2011-08-31 13:25:13 -07:00
|
|
|
@title Events User Guide: Installing Event Listeners
|
|
|
|
@group userguide
|
|
|
|
|
|
|
|
Using Phabricator event listeners to customize behavior.
|
|
|
|
|
|
|
|
= Overview =
|
|
|
|
|
|
|
|
Phabricator allows you to install custom runtime event listeners which can react
|
|
|
|
to certain things happening (like a Maniphest Task being edited) and run custom
|
|
|
|
code to perform logging, synchronize with other systems, or modify workflows.
|
|
|
|
|
|
|
|
NOTE: This feature is new and experimental, so few events are available and
|
|
|
|
things might not be completely stable.
|
|
|
|
|
|
|
|
= Available Events =
|
|
|
|
|
|
|
|
== PhabricatorEventType::TYPE_MANIPHEST_WILLEDITTASK ==
|
|
|
|
|
|
|
|
This event is dispatched before a task is edited, and allows you to respond to
|
|
|
|
or alter the edit. Data available on this event:
|
|
|
|
|
2012-04-07 10:58:46 -07:00
|
|
|
- ##task## The @{class:ManiphestTask} being edited.
|
2011-08-31 13:25:13 -07:00
|
|
|
- ##transactions## The list of edits (objects of class
|
|
|
|
@{class:ManiphestTransaction}) being applied.
|
|
|
|
- ##new## A boolean indicating if this task is being created.
|
|
|
|
- ##mail## If this edit originates from email, the
|
2011-11-08 15:15:44 -08:00
|
|
|
@{class:PhabricatorMetaMTAReceivedMail} object.
|
|
|
|
|
|
|
|
== PhabricatorEventType::TYPE_DIFFERENTIAL_WILLSENDMAIL ==
|
|
|
|
|
2011-12-13 17:13:09 -08:00
|
|
|
This event is dispatched before Differential sends an email, and allows you to
|
2011-11-08 15:15:44 -08:00
|
|
|
edit the message that will be sent. Data available on this event:
|
|
|
|
|
2012-04-07 10:58:46 -07:00
|
|
|
- ##mail## The @{class:PhabricatorMetaMTAMail} being edited.
|
2011-12-13 17:13:09 -08:00
|
|
|
|
|
|
|
== PhabricatorEventType::TYPE_DIFFERENTIAL_WILLMARKGENERATED ==
|
|
|
|
|
|
|
|
This event is dispatched before Differential decides if a file is generated (and
|
|
|
|
doesn't need to be reviewed) or not. Data available on this event:
|
|
|
|
|
|
|
|
- ##corpus## Body of the file.
|
|
|
|
- ##is_generated## Boolean indicating if this file should be treated as
|
|
|
|
generated.
|