Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15416032
D19061.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D19061.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
@@ -87,4 +87,8 @@
$this->hookEngine->getRepository()->getProjectPHIDs());
}
+ public function supportsWebhooks() {
+ return false;
+ }
+
}
diff --git a/src/applications/herald/action/HeraldCallWebhookAction.php b/src/applications/herald/action/HeraldCallWebhookAction.php
--- a/src/applications/herald/action/HeraldCallWebhookAction.php
+++ b/src/applications/herald/action/HeraldCallWebhookAction.php
@@ -14,6 +14,10 @@
}
public function supportsObject($object) {
+ if (!$this->getAdapter()->supportsWebhooks()) {
+ return false;
+ }
+
return true;
}
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
@@ -1211,6 +1211,11 @@
/* -( Webhooks )----------------------------------------------------------- */
+ public function supportsWebhooks() {
+ return true;
+ }
+
+
final public function queueWebhook($webhook_phid, $rule_phid) {
$this->webhookMap[$webhook_phid][] = $rule_phid;
return $this;
diff --git a/src/applications/metamta/herald/PhabricatorMailOutboundMailHeraldAdapter.php b/src/applications/metamta/herald/PhabricatorMailOutboundMailHeraldAdapter.php
--- a/src/applications/metamta/herald/PhabricatorMailOutboundMailHeraldAdapter.php
+++ b/src/applications/metamta/herald/PhabricatorMailOutboundMailHeraldAdapter.php
@@ -64,4 +64,8 @@
return pht('Mail %d', $this->getObject()->getID());
}
+ public function supportsWebhooks() {
+ return false;
+ }
+
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Mar 21, 8:48 AM (1 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7390080
Default Alt Text
D19061.diff (1 KB)
Attached To
Mode
D19061: Prevent "Call webhooks" Herald action from appearing in UI for adapters which can't fire it
Attached
Detach File
Event Timeline
Log In to Comment