show PR title in pull_request events
This commit is contained in:
parent
d7285360ff
commit
cc7c66883d
1 changed files with 3 additions and 2 deletions
|
@ -275,6 +275,7 @@ class GitHub(object):
|
||||||
author = utils.irc.bold(data["pull_request"]["user"]["login"])
|
author = utils.irc.bold(data["pull_request"]["user"]["login"])
|
||||||
number = utils.irc.color("#%s" % data["pull_request"]["number"],
|
number = utils.irc.color("#%s" % data["pull_request"]["number"],
|
||||||
colors.COLOR_ID)
|
colors.COLOR_ID)
|
||||||
|
number += " (%s)" % data["pull_request"]["title"]
|
||||||
identifier = "%s by %s" % (number, author)
|
identifier = "%s by %s" % (number, author)
|
||||||
|
|
||||||
action = data["action"]
|
action = data["action"]
|
||||||
|
@ -295,7 +296,7 @@ class GitHub(object):
|
||||||
elif action == "ready_for_review":
|
elif action == "ready_for_review":
|
||||||
action_desc = "marked %s ready for review" % number
|
action_desc = "marked %s ready for review" % number
|
||||||
elif action == "synchronize":
|
elif action == "synchronize":
|
||||||
action_desc = "committed to %s" % number
|
action_desc = "committed to %s" % identifier
|
||||||
|
|
||||||
commits_url = data["pull_request"]["commits_url"]
|
commits_url = data["pull_request"]["commits_url"]
|
||||||
commits = utils.http.request(commits_url).json()
|
commits = utils.http.request(commits_url).json()
|
||||||
|
@ -313,7 +314,7 @@ class GitHub(object):
|
||||||
data["before"], data["after"])
|
data["before"], data["after"])
|
||||||
single_url = PR_COMMIT_URL % (full_name, raw_number, "%s")
|
single_url = PR_COMMIT_URL % (full_name, raw_number, "%s")
|
||||||
if new_commits:
|
if new_commits:
|
||||||
outputs = self._format_push(number, author, new_commits,
|
outputs = self._format_push(identifier, author, new_commits,
|
||||||
False, single_url, range_url)
|
False, single_url, range_url)
|
||||||
for i, output in enumerate(outputs):
|
for i, output in enumerate(outputs):
|
||||||
outputs[i] = "[PR] %s" % output
|
outputs[i] = "[PR] %s" % output
|
||||||
|
|
Loading…
Reference in a new issue