diff options
| author | 2018-11-07 08:23:07 +0000 | |
|---|---|---|
| committer | 2018-11-07 08:23:07 +0000 | |
| commit | 4000479cf0bab5e3a33c75844c85e5da9dd44acc (patch) | |
| tree | a4481eff01487dd26784c592ff00a5efacf21438 /modules | |
| parent | I decided to not specifically handle printing arrays in !get/!channelget/etc but (diff) | |
| signature | ||
Better show when a PR is merged or not merged when closingd
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/github.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/github.py b/modules/github.py index d7f1d427..45b29161 100644 --- a/modules/github.py +++ b/modules/github.py @@ -93,12 +93,17 @@ class Module(ModuleManager.BaseModule): def pull_request(self, event, full_name, data): action = data["action"] + action_desc = action + if action == "closed": + merged = data["pull_request"]["merged"] + action_desc = "merged" if merged else "closed without merging" + pr_number = data["pull_request"]["number"] pr_title = data["pull_request"]["title"] author = data["sender"]["login"] url = data["pull_request"]["html_url"] return ["(%s) [pr#%d] %s %s: %s - %s" % - (full_name, pr_number, author, action, pr_title, url)] + (full_name, pr_number, author, action_desc, pr_title, url)] def pull_request_review(self, event, full_name, data): action = data["action"] |
