aboutsummaryrefslogtreecommitdiff
path: root/modules/github
diff options
context:
space:
mode:
authorGravatar jesopo2019-05-21 13:53:36 +0100
committerGravatar jesopo2019-05-21 13:53:36 +0100
commit73c3068a8de64391023c0a4d1999cd1ae83a4691 (patch)
tree692b71b0ce6ff91a73af72884a12a82a73e16f41 /modules/github
parentdon't overwrite `tags` var (diff)
signature
`event["channel"]` -> `event["target"]`
Diffstat (limited to 'modules/github')
-rw-r--r--modules/github/__init__.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/github/__init__.py b/modules/github/__init__.py
index 9d61b49b..0cbb9267 100644
--- a/modules/github/__init__.py
+++ b/modules/github/__init__.py
@@ -233,15 +233,15 @@ class Module(ModuleManager.BaseModule):
:command: github
:pattern: https?://github.com/([^/]+)/([^/]+)/(pull|issues)/(\d+)
"""
- if event["channel"].get_setting("auto-github", False):
+ if event["target"].get_setting("auto-github", False):
ref = "%s/%s#%s" % (
url_match.group(1), url_match.group(2), url_match.group(4))
try:
- result = self._get_info(event["channel"], ref)
+ result = self._get_info(event["target"], ref)
except utils.EventError:
return
if result:
- if event["channel"].get_setting("github-hide-prefix", False):
+ if event["target"].get_setting("github-hide-prefix", False):
event["stdout"].hide_preix()
event["stdout"].write(result)
@@ -251,14 +251,14 @@ class Module(ModuleManager.BaseModule):
:command: github
:pattern: (?:\S+(?:\/\S+)?)?#\d+
"""
- if event["channel"].get_setting("auto-github", False):
+ if event["target"].get_setting("auto-github", False):
try:
- result = self._get_info(event["channel"],
+ result = self._get_info(event["target"],
event["match"].group(0))
except utils.EventError:
return
if result:
- if event["channel"].get_setting("github-hide-prefix", False):
+ if event["target"].get_setting("github-hide-prefix", False):
event["stdout"].hide_preix()
event["stdout"].write(result)