show new label for issue 'labeled' events
This commit is contained in:
parent
2885b41bbb
commit
6626f60a64
1 changed files with 8 additions and 3 deletions
|
@ -329,13 +329,18 @@ class GitHub(object):
|
||||||
(sender, COMMENT_ACTIONS[action], number, pr_title, url)]
|
(sender, COMMENT_ACTIONS[action], number, pr_title, url)]
|
||||||
|
|
||||||
def issues(self, full_name, data):
|
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 = 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"]
|
issue_title = data["issue"]["title"]
|
||||||
author = utils.irc.bold(data["sender"]["login"])
|
author = utils.irc.bold(data["sender"]["login"])
|
||||||
url = self._short_url(data["issue"]["html_url"])
|
url = self._short_url(data["issue"]["html_url"])
|
||||||
return ["[issue] %s %s %s: %s - %s" %
|
return ["[issue] %s %s: %s - %s" %
|
||||||
(author, action, number, issue_title, url)]
|
(author, action_str, issue_title, url)]
|
||||||
def issue_comment(self, full_name, data):
|
def issue_comment(self, full_name, data):
|
||||||
if "changes" in data:
|
if "changes" in data:
|
||||||
# don't show this event when nothing has actually changed
|
# don't show this event when nothing has actually changed
|
||||||
|
|
Loading…
Reference in a new issue