From ab602e3a524a8366688b1bcf118b8e98cf63c153 Mon Sep 17 00:00:00 2001 From: vrana Date: Mon, 13 Aug 2012 12:20:34 -0700 Subject: [PATCH] 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 --- src/workflow/ArcanistDiffWorkflow.php | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/workflow/ArcanistDiffWorkflow.php b/src/workflow/ArcanistDiffWorkflow.php index fa850845..1e2c9404 100644 --- a/src/workflow/ArcanistDiffWorkflow.php +++ b/src/workflow/ArcanistDiffWorkflow.php @@ -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); - } } -- 2.43.0