1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-29 10:12:41 +01:00

Pass lint and unit results to diff created event

Summary:
I need to run some jobs only if the tests hasn't been skipped.
I know that this could end up by passing more and more data to the event but this is all I need so far.

Test Plan: Dumped `unitResult` from the listener.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3259
This commit is contained in:
vrana 2012-08-13 12:20:34 -07:00
parent 061a9f8cbd
commit ab602e3a52

View file

@ -435,7 +435,14 @@ EOTEXT
$this->diffID = $diff_info['diffid'];
$this->dispatchDiffWasCreatedEvent($diff_info['diffid']);
$event = new PhutilEvent(
ArcanistEventType::TYPE_DIFF_WASCREATED,
array(
'diffID' => $diff_info['diffid'],
'lintResult' => $lint_result,
'unitResult' => $unit_result,
));
PhutilEventEngine::dispatchEvent($event);
$this->updateLintDiffProperty();
$this->updateUnitDiffProperty();
@ -2268,13 +2275,4 @@ EOTEXT
return $event->getValue('fields');
}
private function dispatchDiffWasCreatedEvent($diff_id) {
$event = new PhutilEvent(
ArcanistEventType::TYPE_DIFF_WASCREATED,
array(
'diffID' => $diff_id,
));
PhutilEventEngine::dispatchEvent($event);
}
}