Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14031100
D13178.id31858.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
6 KB
Referenced Files
None
Subscribers
None
D13178.id31858.diff
View Options
diff --git a/src/applications/diffusion/herald/HeraldPreCommitAdapter.php b/src/applications/diffusion/herald/HeraldPreCommitAdapter.php
--- a/src/applications/diffusion/herald/HeraldPreCommitAdapter.php
+++ b/src/applications/diffusion/herald/HeraldPreCommitAdapter.php
@@ -95,12 +95,6 @@
foreach ($effects as $effect) {
$action = $effect->getAction();
switch ($action) {
- case self::ACTION_NOTHING:
- $result[] = new HeraldApplyTranscript(
- $effect,
- true,
- pht('Did nothing.'));
- break;
case self::ACTION_BLOCK:
$result[] = new HeraldApplyTranscript(
$effect,
diff --git a/src/applications/herald/adapter/HeraldAdapter.php b/src/applications/herald/adapter/HeraldAdapter.php
--- a/src/applications/herald/adapter/HeraldAdapter.php
+++ b/src/applications/herald/adapter/HeraldAdapter.php
@@ -1559,6 +1559,8 @@
return $this->applyFlagEffect($effect);
case self::ACTION_EMAIL:
return $this->applyEmailEffect($effect);
+ case self::ACTION_NOTHING:
+ return $this->applyNothingEffect($effect);
default:
break;
}
@@ -1577,6 +1579,12 @@
return $result;
}
+ private function applyNothingEffect(HeraldEffect $effect) {
+ return new HeraldApplyTranscript(
+ $effect,
+ true,
+ pht('Did nothing.'));
+ }
/**
* @task apply
diff --git a/src/applications/herald/adapter/HeraldCommitAdapter.php b/src/applications/herald/adapter/HeraldCommitAdapter.php
--- a/src/applications/herald/adapter/HeraldCommitAdapter.php
+++ b/src/applications/herald/adapter/HeraldCommitAdapter.php
@@ -491,12 +491,6 @@
foreach ($effects as $effect) {
$action = $effect->getAction();
switch ($action) {
- case self::ACTION_NOTHING:
- $result[] = new HeraldApplyTranscript(
- $effect,
- true,
- pht('Great success at doing nothing.'));
- break;
case self::ACTION_ADD_CC:
foreach ($effect->getTarget() as $phid) {
if (empty($this->addCCPHIDs[$phid])) {
diff --git a/src/applications/herald/adapter/HeraldDifferentialDiffAdapter.php b/src/applications/herald/adapter/HeraldDifferentialDiffAdapter.php
--- a/src/applications/herald/adapter/HeraldDifferentialDiffAdapter.php
+++ b/src/applications/herald/adapter/HeraldDifferentialDiffAdapter.php
@@ -77,7 +77,7 @@
public function getActionNameMap($rule_type) {
return array(
self::ACTION_BLOCK => pht('Block diff with message'),
- );
+ ) + parent::getActionNameMap($rule_type);
}
public function getHeraldField($field) {
@@ -141,12 +141,6 @@
foreach ($effects as $effect) {
$action = $effect->getAction();
switch ($action) {
- case self::ACTION_NOTHING:
- $result[] = new HeraldApplyTranscript(
- $effect,
- true,
- pht('Did nothing.'));
- break;
case self::ACTION_BLOCK:
$result[] = new HeraldApplyTranscript(
$effect,
@@ -154,10 +148,8 @@
pht('Blocked diff.'));
break;
default:
- $result[] = new HeraldApplyTranscript(
- $effect,
- false,
- pht('No rules to handle action "%s"!', $action));
+ $result[] = $this->applyStandardEffect($effect);
+ break;
}
}
diff --git a/src/applications/herald/adapter/HeraldDifferentialRevisionAdapter.php b/src/applications/herald/adapter/HeraldDifferentialRevisionAdapter.php
--- a/src/applications/herald/adapter/HeraldDifferentialRevisionAdapter.php
+++ b/src/applications/herald/adapter/HeraldDifferentialRevisionAdapter.php
@@ -293,12 +293,6 @@
foreach ($effects as $effect) {
$action = $effect->getAction();
switch ($action) {
- case self::ACTION_NOTHING:
- $result[] = new HeraldApplyTranscript(
- $effect,
- true,
- pht('OK, did nothing.'));
- break;
case self::ACTION_ADD_CC:
$base_target = $effect->getTarget();
$forbidden = array();
diff --git a/src/applications/herald/adapter/HeraldManiphestTaskAdapter.php b/src/applications/herald/adapter/HeraldManiphestTaskAdapter.php
--- a/src/applications/herald/adapter/HeraldManiphestTaskAdapter.php
+++ b/src/applications/herald/adapter/HeraldManiphestTaskAdapter.php
@@ -148,12 +148,6 @@
foreach ($effects as $effect) {
$action = $effect->getAction();
switch ($action) {
- case self::ACTION_NOTHING:
- $result[] = new HeraldApplyTranscript(
- $effect,
- true,
- pht('Great success at doing nothing.'));
- break;
case self::ACTION_ADD_CC:
foreach ($effect->getTarget() as $phid) {
$this->ccPHIDs[] = $phid;
diff --git a/src/applications/herald/adapter/HeraldPholioMockAdapter.php b/src/applications/herald/adapter/HeraldPholioMockAdapter.php
--- a/src/applications/herald/adapter/HeraldPholioMockAdapter.php
+++ b/src/applications/herald/adapter/HeraldPholioMockAdapter.php
@@ -117,12 +117,6 @@
foreach ($effects as $effect) {
$action = $effect->getAction();
switch ($action) {
- case self::ACTION_NOTHING:
- $result[] = new HeraldApplyTranscript(
- $effect,
- true,
- pht('Great success at doing nothing.'));
- break;
case self::ACTION_ADD_CC:
foreach ($effect->getTarget() as $phid) {
$this->ccPHIDs[] = $phid;
diff --git a/src/applications/phriction/herald/PhrictionDocumentHeraldAdapter.php b/src/applications/phriction/herald/PhrictionDocumentHeraldAdapter.php
--- a/src/applications/phriction/herald/PhrictionDocumentHeraldAdapter.php
+++ b/src/applications/phriction/herald/PhrictionDocumentHeraldAdapter.php
@@ -118,12 +118,6 @@
foreach ($effects as $effect) {
$action = $effect->getAction();
switch ($action) {
- case self::ACTION_NOTHING:
- $result[] = new HeraldApplyTranscript(
- $effect,
- true,
- pht('Great success at doing nothing.'));
- break;
case self::ACTION_ADD_CC:
foreach ($effect->getTarget() as $phid) {
$this->ccPHIDs[] = $phid;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 10, 9:16 AM (1 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6764099
Default Alt Text
D13178.id31858.diff (6 KB)
Attached To
Mode
D13178: Make ACTION_NOTHING a "standard" action in Herald
Attached
Detach File
Event Timeline
Log In to Comment