Allow non-category items to be placed in a channel's event categories, allowing
users to specify specific events (github.py)
This commit is contained in:
parent
4981d70be4
commit
be5c5e6c21
1 changed files with 5 additions and 2 deletions
|
@ -190,8 +190,11 @@ class Module(ModuleManager.BaseModule):
|
||||||
|
|
||||||
event_categories = channel.get_setting(
|
event_categories = channel.get_setting(
|
||||||
"github-events", DEFAULT_EVENT_CATEGORIES)
|
"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
|
if (github_event in github_events or
|
||||||
(event_action and event_action in github_events)):
|
(event_action and event_action in github_events)):
|
||||||
|
|
Loading…
Reference in a new issue