diff options
| author | 2019-01-18 13:25:53 +0000 | |
|---|---|---|
| committer | 2019-01-18 13:25:53 +0000 | |
| commit | c7ba2b778bdafa1ef350b97ddc81775f9be367d5 (patch) | |
| tree | 675f131ce7408af7b950b11c404c6a04a1463569 /modules/github/module.py | |
| parent | Display event categories in a smaller font (ghwebhook.md) (diff) | |
| signature | ||
Delete `github-hooks` channel setting when it's empty (github)
Diffstat (limited to 'modules/github/module.py')
| -rw-r--r-- | modules/github/module.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/github/module.py b/modules/github/module.py index 4662fa57..696f7810 100644 --- a/modules/github/module.py +++ b/modules/github/module.py @@ -175,7 +175,10 @@ class Module(ModuleManager.BaseModule): event["stderr"].write("No hook found for %s" % hook) return del all_hooks[existing_hook] - event["target"].set_setting("github-hooks", all_hooks) + if all_hooks: + event["target"].set_setting("github-hooks", all_hooks) + else: + event["target"].del_setting("github-hooks") event["stdout"].write("Removed hook for %s" % hook) elif event["args_split"][0] == "events": if not existing_hook: |
