aboutsummaryrefslogtreecommitdiff
path: root/modules/github.py
diff options
context:
space:
mode:
authorGravatar jesopo2019-01-18 08:18:47 +0000
committerGravatar jesopo2019-01-18 08:18:47 +0000
commitbe5c5e6c21ff26939c163da98022d14b2c4a898a (patch)
tree68fccafe074862a5ff6661504a1a07feb790e403 /modules/github.py
parentcombine github events and their actions to be able to filter by event type and (diff)
signature
Allow non-category items to be placed in a channel's event categories, allowing
users to specify specific events (github.py)
Diffstat (limited to 'modules/github.py')
-rw-r--r--modules/github.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/github.py b/modules/github.py
index c14126f7..bbb8b4e6 100644
--- a/modules/github.py
+++ b/modules/github.py
@@ -190,8 +190,11 @@ class Module(ModuleManager.BaseModule):
event_categories = channel.get_setting(
"github-events", DEFAULT_EVENT_CATEGORIES)
- github_events = list(itertools.chain(
- *[EVENT_CATEGORIES[c] for c in event_categories]))
+
+ github_events = []
+ for category in event_categories:
+ github_events.append(EVENT_CATEGORIES.get(c, [c]))
+ github_events = list(itertools.chain(*github_events))
if (github_event in github_events or
(event_action and event_action in github_events)):