From 39cef6cb991a75307a5ad2ae9b45def6e362150e Mon Sep 17 00:00:00 2001 From: vrana Date: Fri, 1 Feb 2013 14:59:09 -0800 Subject: [PATCH] Dispatch event after collecting changes in diff Summary: FB currently starts Sandcastle push before starting the diff workflow. If `arc diff` commits something then we need to restart the push. I want to avoid this by starting the push after commit. Test Plan: Will test after implementing the listener. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D4785 --- src/events/constant/ArcanistEventType.php | 1 + src/workflow/ArcanistDiffWorkflow.php | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/events/constant/ArcanistEventType.php b/src/events/constant/ArcanistEventType.php index 409fac72..26dfa260 100644 --- a/src/events/constant/ArcanistEventType.php +++ b/src/events/constant/ArcanistEventType.php @@ -4,6 +4,7 @@ final class ArcanistEventType extends PhutilEventType { const TYPE_COMMIT_WILLCOMMITSVN = 'commit.willCommitSVN'; + const TYPE_DIFF_DIDCOLLECTCHANGES = 'diff.didCollectChanges'; const TYPE_DIFF_WILLBUILDMESSAGE = 'diff.willBuildMessage'; const TYPE_DIFF_DIDBUILDMESSAGE = 'diff.didBuildMessage'; const TYPE_DIFF_WASCREATED = 'diff.wasCreated'; diff --git a/src/workflow/ArcanistDiffWorkflow.php b/src/workflow/ArcanistDiffWorkflow.php index 801eb5b1..374217b9 100644 --- a/src/workflow/ArcanistDiffWorkflow.php +++ b/src/workflow/ArcanistDiffWorkflow.php @@ -685,6 +685,10 @@ EOTEXT } } } + + $this->dispatchEvent( + ArcanistEventType::TYPE_DIFF_DIDCOLLECTCHANGES, + array()); } private function buildRevisionFromCommitMessage( -- 2.43.0