diff options
| author | 2018-11-20 10:27:28 +0000 | |
|---|---|---|
| committer | 2018-11-20 10:27:28 +0000 | |
| commit | c2ef675bf0b56927d512f65ccc3136f02d69555d (patch) | |
| tree | 371cd883a3a5735e1afc06448650b66ae58a763f /modules/github.py | |
| parent | Change merged branch name from blue to light blue (github.py) (diff) | |
| signature | ||
Better descript opened pull requests (github.py)
Diffstat (limited to 'modules/github.py')
| -rw-r--r-- | modules/github.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/modules/github.py b/modules/github.py index 9a2ea036..3c7a0a72 100644 --- a/modules/github.py +++ b/modules/github.py @@ -159,12 +159,16 @@ class Module(ModuleManager.BaseModule): def pull_request(self, event, full_name, data): action = data["action"] action_desc = action - if action == "closed": + branch = data["pull_request"]["base"]["ref"] + colored_branch = utils.irc.color(branch, utils.consts.LIGHTBLUE) + + if action == "opened": + action_desc = "requested merge into %s" % colored_branch + elif action == "closed": if data["pull_request"]["merged"]: - branch = data["pull_request"]["base"]["ref"] action_desc = "%s into %s" % ( utils.irc.color("merged", utils.consts.GREEN), - utils.irc.color(branch, utils.consts.LIGHTBLUE)) + colored_branch) else: action_desc = utils.irc.color("closed without merging", utils.consts.RED) |
