mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-30 09:20:58 +01:00
Create timeline events for comments
Summary: to enable publishing to internfeed, we create timeline events for the comments. Test Plan: create a test revision, comments on it and check if it creates a timeline event with correct data at /daemon/timeline. Reviewers: epriestley,tuomaspelkonen CC: Differential Revision: 144
This commit is contained in:
parent
4e8968aff3
commit
825748586b
2 changed files with 11 additions and 12 deletions
|
@ -318,19 +318,17 @@ class DifferentialCommentEditor {
|
|||
->setChangedByCommit($this->getChangedByCommit())
|
||||
->send();
|
||||
|
||||
/*
|
||||
|
||||
TODO
|
||||
|
||||
$event = array(
|
||||
'revision_id' => $revision->getID(),
|
||||
'fbid' => $revision->getFBID(),
|
||||
'feedback_id' => $feedback->getID(),
|
||||
'action' => $feedback->getAction(),
|
||||
'actor' => $this->actorPHID,
|
||||
$event_data = array(
|
||||
'revision_id' => $revision->getID(),
|
||||
'revision_phid' => $revision->getPHID(),
|
||||
'revision_name' => $revision->getTitle(),
|
||||
'revision_author_phid' => $revision->getAuthorPHID(),
|
||||
'action' => $comment->getAction(),
|
||||
'feedback_content' => $comment->getContent(),
|
||||
'actor_phid' => $this->actorPHID,
|
||||
);
|
||||
id(new ToolsTimelineEvent('difx', fb_json_encode($event)))->record();
|
||||
*/
|
||||
id(new PhabricatorTimelineEvent('difx', $event_data))
|
||||
->recordEvent();
|
||||
|
||||
return $comment;
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@ phutil_require_module('phabricator', 'applications/differential/storage/changese
|
|||
phutil_require_module('phabricator', 'applications/differential/storage/comment');
|
||||
phutil_require_module('phabricator', 'applications/differential/storage/inlinecomment');
|
||||
phutil_require_module('phabricator', 'applications/phid/handle/data');
|
||||
phutil_require_module('phabricator', 'infrastructure/daemon/timeline/storage/event');
|
||||
|
||||
phutil_require_module('phutil', 'utils');
|
||||
|
||||
|
|
Loading…
Reference in a new issue