aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar jesopo2019-03-01 22:21:07 +0000
committerGravatar jesopo2019-03-01 22:21:07 +0000
commitab0b3be74126651ba1246f0805b006534523c879 (patch)
tree584c79c8bd0099d1a4241b3239b07fe236562ef8
parentFix `event` variable name collision (github) (diff)
signature
`event` doesn't have a `"channel"` in an API hook
-rw-r--r--modules/github/__init__.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/modules/github/__init__.py b/modules/github/__init__.py
index 61e759f9..c36f230b 100644
--- a/modules/github/__init__.py
+++ b/modules/github/__init__.py
@@ -368,14 +368,15 @@ class Module(ModuleManager.BaseModule):
elif github_event == "watch":
outputs = self.watch(data)
- source = full_name or organisation
- hide_org = event["channel"].get_setting("github-hide-organisation",
- False)
- if repo_name and hide_org:
- source = repo_name
if outputs:
for server, channel in targets:
+ source = full_name or organisation
+ hide_org = channel.get_setting(
+ "github-hide-organisation", False)
+ if repo_name and hide_org:
+ source = repo_name
+
for output in outputs:
output = "(%s) %s" % (
utils.irc.color(source, COLOR_REPO), output)