mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-19 12:00:55 +01:00
Create timeline event for revision creation
Summary: create the event Test Plan: checked the timeline event was consumed successfully by facebook daemon when the revision is created from the webUI or arc command line. Reviewed By: epriestley Reviewers: epriestley, aran CC: aran, epriestley Differential Revision: 478
This commit is contained in:
parent
198f447bd9
commit
3272008aef
2 changed files with 18 additions and 0 deletions
|
@ -359,6 +359,22 @@ class DifferentialRevisionEditor {
|
|||
|
||||
$revision->save();
|
||||
|
||||
$event_data = array(
|
||||
'revision_id' => $revision->getID(),
|
||||
'revision_phid' => $revision->getPHID(),
|
||||
'revision_name' => $revision->getTitle(),
|
||||
'revision_author_phid' => $revision->getAuthorPHID(),
|
||||
'action' => $is_new
|
||||
? DifferentialAction::ACTION_CREATE
|
||||
: DifferentialAction::ACTION_UPDATE,
|
||||
'feedback_content' => $is_new
|
||||
? ''
|
||||
: $this->getComments(),
|
||||
'actor_phid' => $revision->getAuthorPHID(),
|
||||
);
|
||||
id(new PhabricatorTimelineEvent('difx', $event_data))
|
||||
->recordEvent();
|
||||
|
||||
// TODO
|
||||
// $revision->saveTransaction();
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
|
||||
|
||||
phutil_require_module('phabricator', 'applications/differential/constants/action');
|
||||
phutil_require_module('phabricator', 'applications/differential/constants/revisionstatus');
|
||||
phutil_require_module('phabricator', 'applications/differential/mail/ccwelcome');
|
||||
phutil_require_module('phabricator', 'applications/differential/mail/newdiff');
|
||||
|
@ -16,6 +17,7 @@ phutil_require_module('phabricator', 'applications/herald/engine/engine');
|
|||
phutil_require_module('phabricator', 'applications/herald/storage/transcript/base');
|
||||
phutil_require_module('phabricator', 'applications/phid/handle/data');
|
||||
phutil_require_module('phabricator', 'applications/search/index/indexer/differential');
|
||||
phutil_require_module('phabricator', 'infrastructure/daemon/timeline/storage/event');
|
||||
phutil_require_module('phabricator', 'infrastructure/env');
|
||||
phutil_require_module('phabricator', 'storage/qsprintf');
|
||||
phutil_require_module('phabricator', 'storage/queryfx');
|
||||
|
|
Loading…
Reference in a new issue