aboutsummaryrefslogtreecommitdiff
path: root/modules/github.py
diff options
context:
space:
mode:
authorGravatar jesopo2018-11-07 11:47:54 +0000
committerGravatar jesopo2018-11-07 11:47:54 +0000
commitd961416401e7c5f7788e038498ad5a62bccb9c62 (patch)
tree676f2b4eac0ef82b3cf360b229a23e87b850953f /modules/github.py
parentHide [Github] prefix in modules/github.py (diff)
signature
Color "merged" and "closed without merging" in green and red respectively
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 f1c8d780..e051192c 100644
--- a/modules/github.py
+++ b/modules/github.py
@@ -95,8 +95,11 @@ class Module(ModuleManager.BaseModule):
action = data["action"]
action_desc = action
if action == "closed":
- merged = data["pull_request"]["merged"]
- action_desc = "merged" if merged else "closed without merging"
+ if data["pull_request"]["merged"]:
+ action_desc = utils.irc.color("merged", utils.irc.COLOR_GREEN)
+ else:
+ action_desc = utils.irc.color("closed without merging",
+ utils.irc.COLOR_RED)
pr_number = data["pull_request"]["number"]
pr_title = data["pull_request"]["title"]