]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Pass the constructed message to the TYPE_DIFF_DIDBUILDMESSAGE event.
authorRoy Williams <royw@fb.com>
Tue, 8 Jan 2013 23:06:46 +0000 (15:06 -0800)
committerRoy Williams <royw@fb.com>
Tue, 8 Jan 2013 23:06:46 +0000 (15:06 -0800)
Summary: We want to use TYPE_DIFF_DIDBUILDMESSAGE to abort arc diff when a message doesn't fit some

Test Plan: Created an EventListener subscribed to TYPE_DIFF_DIDBUILDMESSAGE, validated the 'message' field was filled in

Reviewers: vrana, epriestley

Reviewed By: epriestley

CC: aran, epriestley
Differential Revision: https://secure.phabricator.com/D4361

src/workflow/ArcanistDiffWorkflow.php

index 6b5108635c3adb57e486bdeab47da0e5cadfd1cb..d285f87f2d3e7629d0fa6236690486043d494dfc 100644 (file)
@@ -428,7 +428,10 @@ EOTEXT
 
     $this->dispatchEvent(
       ArcanistEventType::TYPE_DIFF_DIDBUILDMESSAGE,
-      array());
+      array(
+        'message' => $commit_message
+      )
+    );
 
     if (!$this->shouldOnlyCreateDiff()) {
       $revision = $this->buildRevisionFromCommitMessage($commit_message);