event.eat() for command.regex hooks in github module

This commit is contained in:
jesopo 2019-05-22 22:31:03 +01:00
parent 86c36d2ecc
commit 8cc0b84e53

View file

@ -234,6 +234,7 @@ class Module(ModuleManager.BaseModule):
:pattern: https?://github.com/([^/]+)/([^/]+)/(pull|issues)/(\d+)
"""
if event["target"].get_setting("auto-github", False):
event.eat()
ref = "%s/%s#%s" % (event["match"].group(1),
event["match"].group(2), event["match"].group(4))
try:
@ -252,6 +253,7 @@ class Module(ModuleManager.BaseModule):
:pattern: (?:\S+(?:\/\S+)?)?#\d+
"""
if event["target"].get_setting("auto-github", False):
event.eat()
try:
result = self._get_info(event["target"],
event["match"].group(0))