diff options
| author | 2019-06-24 15:51:55 +0100 | |
|---|---|---|
| committer | 2019-06-24 15:51:55 +0100 | |
| commit | 9ae97627c60d2753798c25a28be3f4b2a6a56bee (patch) | |
| tree | f96c22941dbe9d5d9a8ac186209ebc0e55e9b223 | |
| parent | 'github-hooks' -> 'webhooks'. this is a breaking change! (diff) | |
| signature | ||
'webhooks' -> 'git-webhooks'. move all 'webhooks' settings to 'git-webhooks'
| -rw-r--r-- | modules/git_webhooks/__init__.py (renamed from modules/webhooks/__init__.py) | 9 | ||||
| -rw-r--r-- | modules/git_webhooks/github.py (renamed from modules/webhooks/github.py) | 0 |
2 files changed, 5 insertions, 4 deletions
diff --git a/modules/webhooks/__init__.py b/modules/git_webhooks/__init__.py index 8538cecb..d861e5bb 100644 --- a/modules/webhooks/__init__.py +++ b/modules/git_webhooks/__init__.py @@ -35,7 +35,8 @@ class Module(ModuleManager.BaseModule): branch = handler.branch(data, headers) current_event, event_action = handler.event(data, headers) - hooks = self.bot.database.channel_settings.find_by_setting("webhooks") + hooks = self.bot.database.channel_settings.find_by_setting( + "git-webhooks") targets = [] repo_hooked = False @@ -126,7 +127,7 @@ class Module(ModuleManager.BaseModule): :usage: events <hook> [category [category ...]] :usage: branches <hook> [branch [branch ...]] """ - all_hooks = event["target"].get_setting("webhooks", {}) + all_hooks = event["target"].get_setting("git-webhooks", {}) hook_name = None existing_hook = None if len(event["args_split"]) > 1: @@ -188,8 +189,8 @@ class Module(ModuleManager.BaseModule): if not success_message == None: if all_hooks: - event["target"].set_setting("webhooks", all_hooks) + event["target"].set_setting("git-webhooks", all_hooks) else: - event["target"].del_setting("webhooks") + event["target"].del_setting("git-webhooks") event["stdout"].write(success_message) diff --git a/modules/webhooks/github.py b/modules/git_webhooks/github.py index 3314049d..3314049d 100644 --- a/modules/webhooks/github.py +++ b/modules/git_webhooks/github.py |
