]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Dispatch event after collecting changes in diff
authorvrana <jakubv@fb.com>
Fri, 1 Feb 2013 22:59:09 +0000 (14:59 -0800)
committervrana <jakubv@fb.com>
Sat, 2 Feb 2013 20:45:19 +0000 (12:45 -0800)
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
src/workflow/ArcanistDiffWorkflow.php

index 409fac72c4907bda54abb33e9d2df3f8de636b5e..26dfa26091343d9666ba711adab6a94b36cc30ac 100644 (file)
@@ -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';
index 801eb5b1b78b9d916163279579015740b5b4a2ed..374217b99f0f596feaa962b3e16ef0a00733ae05 100644 (file)
@@ -685,6 +685,10 @@ EOTEXT
         }
       }
     }
+
+    $this->dispatchEvent(
+      ArcanistEventType::TYPE_DIFF_DIDCOLLECTCHANGES,
+      array());
   }
 
   private function buildRevisionFromCommitMessage(