From d961416401e7c5f7788e038498ad5a62bccb9c62 Mon Sep 17 00:00:00 2001 From: jesopo Date: Wed, 7 Nov 2018 11:47:54 +0000 Subject: Color "merged" and "closed without merging" in green and red respectively --- modules/github.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'modules/github.py') 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"] -- cgit v1.3.1-10-gc9f91