Delete github-hooks
channel setting when it's empty (github)
This commit is contained in:
parent
9bbf3147d0
commit
c7ba2b778b
1 changed files with 4 additions and 1 deletions
|
@ -175,7 +175,10 @@ class Module(ModuleManager.BaseModule):
|
|||
event["stderr"].write("No hook found for %s" % hook)
|
||||
return
|
||||
del all_hooks[existing_hook]
|
||||
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:
|
||||
|
|
Loading…
Reference in a new issue