We don't need to expliticly print issue/pr numbers; they're shown in the urls
This commit is contained in:
parent
7489b3dd96
commit
f15e3c8ffe
1 changed files with 11 additions and 17 deletions
|
@ -101,50 +101,44 @@ class Module(ModuleManager.BaseModule):
|
||||||
action_desc = utils.irc.color("closed without merging",
|
action_desc = utils.irc.color("closed without merging",
|
||||||
utils.irc.COLOR_RED)
|
utils.irc.COLOR_RED)
|
||||||
|
|
||||||
pr_number = data["pull_request"]["number"]
|
|
||||||
pr_title = data["pull_request"]["title"]
|
pr_title = data["pull_request"]["title"]
|
||||||
author = data["sender"]["login"]
|
author = data["sender"]["login"]
|
||||||
url = data["pull_request"]["html_url"]
|
url = data["pull_request"]["html_url"]
|
||||||
return ["(%s) [pr#%d] %s %s: %s - %s" %
|
return ["(%s) [pr] %s %s: %s - %s" %
|
||||||
(full_name, pr_number, author, action_desc, pr_title, url)]
|
(full_name, author, action_desc, pr_title, url)]
|
||||||
|
|
||||||
def pull_request_review(self, event, full_name, data):
|
def pull_request_review(self, event, full_name, data):
|
||||||
if data["review"]["state"] == "commented":
|
if data["review"]["state"] == "commented":
|
||||||
return []
|
return []
|
||||||
|
|
||||||
action = data["action"]
|
action = data["action"]
|
||||||
pr_number = data["pull_request"]["number"]
|
|
||||||
pr_title = data["pull_request"]["title"]
|
pr_title = data["pull_request"]["title"]
|
||||||
reviewer = data["review"]["user"]["login"]
|
reviewer = data["review"]["user"]["login"]
|
||||||
url = data["review"]["html_url"]
|
url = data["review"]["html_url"]
|
||||||
return ["(%s) [pr#%d] %s %s a review on: %s - %s" %
|
return ["(%s) [pr] %s %s a review on: %s - %s" %
|
||||||
(full_name, pr_number, reviewer, action, pr_title, url)]
|
(full_name, reviewer, action, pr_title, url)]
|
||||||
|
|
||||||
def pull_request_review_comment(self, event, full_name, data):
|
def pull_request_review_comment(self, event, full_name, data):
|
||||||
action = data["action"]
|
action = data["action"]
|
||||||
pr_number = data["pull_request"]["number"]
|
|
||||||
pr_title = data["pull_request"]["title"]
|
pr_title = data["pull_request"]["title"]
|
||||||
commenter = data["comment"]["user"]["login"]
|
commenter = data["comment"]["user"]["login"]
|
||||||
url = data["comment"]["html_url"]
|
url = data["comment"]["html_url"]
|
||||||
return ["(%s) [pr#%d] %s %s on a review: %s - %s" %
|
return ["(%s) [pr] %s %s on a review: %s - %s" %
|
||||||
(full_name, pr_number, commenter, COMMENT_ACTIONS[action], pr_title,
|
(full_name, commenter, COMMENT_ACTIONS[action], pr_title, url)]
|
||||||
url)]
|
|
||||||
|
|
||||||
def issues(self, event, full_name, data):
|
def issues(self, event, full_name, data):
|
||||||
action = data["action"]
|
action = data["action"]
|
||||||
issue_number = data["issue"]["number"]
|
|
||||||
issue_title = data["issue"]["title"]
|
issue_title = data["issue"]["title"]
|
||||||
author = data["sender"]["login"]
|
author = data["sender"]["login"]
|
||||||
url = data["issue"]["html_url"]
|
url = data["issue"]["html_url"]
|
||||||
return ["(%s) [issue#%d] %s %s: %s - %s" %
|
return ["(%s) [issue] %s %s: %s - %s" %
|
||||||
(full_name, issue_number, author, action, issue_title, url)]
|
(full_name, author, action, issue_title, url)]
|
||||||
def issue_comment(self, event, full_name, data):
|
def issue_comment(self, event, full_name, data):
|
||||||
action = data["action"]
|
action = data["action"]
|
||||||
issue_number = data["issue"]["number"]
|
|
||||||
issue_title = data["issue"]["title"]
|
issue_title = data["issue"]["title"]
|
||||||
type = "pr" if "pull_request" in data["issue"] else "issue"
|
type = "pr" if "pull_request" in data["issue"] else "issue"
|
||||||
commenter = data["comment"]["user"]["login"]
|
commenter = data["comment"]["user"]["login"]
|
||||||
url = data["comment"]["html_url"]
|
url = data["comment"]["html_url"]
|
||||||
return ["(%s) [%s#%d] %s %s on: %s - %s" %
|
return ["(%s) [%s] %s %s on: %s - %s" %
|
||||||
(full_name, type, issue_number, commenter, COMMENT_ACTIONS[action],
|
(full_name, type, commenter, COMMENT_ACTIONS[action], issue_title,
|
||||||
issue_title, url)]
|
url)]
|
||||||
|
|
Loading…
Reference in a new issue