craftcms / webhooks

Plugin for integrating Craft with Zapier and IFTTT.
https://plugins.craftcms.com/webhooks
MIT License
84 stars 12 forks source link

Add option to disable web hooks in dev mode #4

Closed levinelson closed 5 years ago

levinelson commented 5 years ago

Hi, love the plugin! It'd be awesome if there was an easy switch for disabling the web hooks while in dev mode, so I don't keep sending all sorts of test data to the web hook.

brandonkelly commented 5 years ago

The next Craft CMS release will have a new disabledPlugins config setting, which you can use to disable the Webhooks plugin entirely in Dev environments:

// -- config/general.php --
'dev' => [
    'disabledPlugins' => ['webhooks'],
],
devinellis commented 5 years ago

Alternatively, maybe the webhook payload could include the environment name? It would allow for deeper integrations (e.g. separate channels in Slack). In Zapier I'm not seeing it as an option.

brandonkelly commented 5 years ago

@devinellis Can you post as a separate issue?

carlcs commented 3 years ago

@brandonkelly I’ve just read the issue in the CMS repo about the problem that can occur when disabling plugins on an environment basis (https://github.com/craftcms/cms/issues/9576). It sounds like we need a better solution for disabling webhook calls.

brandonkelly commented 3 years ago

@carlcs Yeah good point. Just released v2.4.1 with a new disableAllWebhooks setting you can set to true from config/webhooks.php:

use craft\helpers\App;

return [
    'disableAllWebhooks' => (bool)App::env('DISABLE_WEBHOOKS'),
    // ...
];