Page MenuHomePhabricator

D10316.diff
No OneTemporary

D10316.diff

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
@@ -72,16 +72,20 @@
switch ($rule_type) {
case HeraldRuleTypeConfig::RULE_TYPE_GLOBAL:
case HeraldRuleTypeConfig::RULE_TYPE_OBJECT:
- return array(
- self::ACTION_BLOCK,
- self::ACTION_EMAIL,
- self::ACTION_NOTHING
- );
+ return array_merge(
+ array(
+ self::ACTION_BLOCK,
+ self::ACTION_EMAIL,
+ self::ACTION_NOTHING,
+ ),
+ parent::getActions($rule_type));
case HeraldRuleTypeConfig::RULE_TYPE_PERSONAL:
- return array(
- self::ACTION_EMAIL,
- self::ACTION_NOTHING,
- );
+ return array_merge(
+ array(
+ self::ACTION_EMAIL,
+ self::ACTION_NOTHING,
+ ),
+ parent::getActions($rule_type));
}
}
@@ -118,7 +122,15 @@
pht('Blocked push.'));
break;
default:
- throw new Exception(pht('No rules to handle action "%s"!', $action));
+ $custom_result = parent::handleCustomHeraldEffect($effect);
+ if ($custom_result === null) {
+ throw new Exception(pht(
+ "No rules to handle action '%s'.",
+ $action));
+ }
+
+ $result[] = $custom_result;
+ break;
}
}
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
@@ -544,7 +544,9 @@
default:
$custom_result = parent::handleCustomHeraldEffect($effect);
if ($custom_result === null) {
- throw new Exception("No rules to handle action '{$action}'.");
+ throw new Exception(pht(
+ "No rules to handle action '%s'.",
+ $action));
}
$result[] = $custom_result;
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
@@ -422,7 +422,9 @@
default:
$custom_result = parent::handleCustomHeraldEffect($effect);
if ($custom_result === null) {
- throw new Exception("No rules to handle action '{$action}'.");
+ throw new Exception(pht(
+ "No rules to handle action '%s'.",
+ $action));
}
$result[] = $custom_result;
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
@@ -207,7 +207,9 @@
default:
$custom_result = parent::handleCustomHeraldEffect($effect);
if ($custom_result === null) {
- throw new Exception("No rules to handle action '{$action}'.");
+ throw new Exception(pht(
+ "No rules to handle action '%s'.",
+ $action));
}
$result[] = $custom_result;
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
@@ -139,7 +139,9 @@
default:
$custom_result = parent::handleCustomHeraldEffect($effect);
if ($custom_result === null) {
- throw new Exception("No rules to handle action '{$action}'.");
+ throw new Exception(pht(
+ "No rules to handle action '%s'.",
+ $action));
}
$result[] = $custom_result;

File Metadata

Mime Type
text/plain
Expires
Sat, Sep 21, 1:15 PM (21 h, 27 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6624733
Default Alt Text
D10316.diff (4 KB)

Event Timeline