aboutsummaryrefslogtreecommitdiff
path: root/modules/git_webhooks/github.py
diff options
context:
space:
mode:
authorGravatar jesopo2019-07-09 09:42:42 +0100
committerGravatar jesopo2019-07-09 09:42:42 +0100
commit6626f60a64f0677027fee1dadcde2091922bb452 (patch)
treed70b1dfe5c22d460f6b2794f50515569e0d1a320 /modules/git_webhooks/github.py
parent.lower()ify webhook repo names for case insensitive checks (diff)
signature
show new label for issue 'labeled' events
Diffstat (limited to 'modules/git_webhooks/github.py')
-rw-r--r--modules/git_webhooks/github.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/modules/git_webhooks/github.py b/modules/git_webhooks/github.py
index 8072a51e..4abc38fc 100644
--- a/modules/git_webhooks/github.py
+++ b/modules/git_webhooks/github.py
@@ -329,13 +329,18 @@ class GitHub(object):
(sender, COMMENT_ACTIONS[action], number, pr_title, url)]
def issues(self, full_name, data):
- number = utils.irc.color("#%s" % data["issue"]["number"], colors.COLOR_ID)
+ number = utils.irc.color("#%s" % data["issue"]["number"],
+ colors.COLOR_ID)
action = data["action"]
+ action_str = "%s %s" % (action, number)
+ if action == "labeled":
+ action_str = "labeled %s as '%s'" % (number, data["label"]["name"])
+
issue_title = data["issue"]["title"]
author = utils.irc.bold(data["sender"]["login"])
url = self._short_url(data["issue"]["html_url"])
- return ["[issue] %s %s %s: %s - %s" %
- (author, action, number, issue_title, url)]
+ return ["[issue] %s %s: %s - %s" %
+ (author, action_str, issue_title, url)]
def issue_comment(self, full_name, data):
if "changes" in data:
# don't show this event when nothing has actually changed