Correctly support labeling pull requests, support unlabeling pull requests and support both on issues
This commit is contained in:
parent
de60d245b5
commit
6dc58d4ceb
1 changed files with 9 additions and 1 deletions
|
@ -178,7 +178,9 @@ class Module(ModuleManager.BaseModule):
|
||||||
elif action == "synchronize":
|
elif action == "synchronize":
|
||||||
action_desc = "committed to"
|
action_desc = "committed to"
|
||||||
elif action == "labeled":
|
elif action == "labeled":
|
||||||
action_desc = "labeled as '%s'" % data["pull_request"]["labels"][-1]
|
action_desc = "labeled as '%s'" % data["label"]["name"]
|
||||||
|
elif action == "unlabeled":
|
||||||
|
action_desc = "unlabeled as '%s'" % data["label"]["name"]
|
||||||
|
|
||||||
pr_title = data["pull_request"]["title"]
|
pr_title = data["pull_request"]["title"]
|
||||||
author = utils.irc.bold(data["sender"]["login"])
|
author = utils.irc.bold(data["sender"]["login"])
|
||||||
|
@ -206,6 +208,12 @@ class Module(ModuleManager.BaseModule):
|
||||||
|
|
||||||
def issues(self, event, full_name, data):
|
def issues(self, event, full_name, data):
|
||||||
action = data["action"]
|
action = data["action"]
|
||||||
|
action_desc = action
|
||||||
|
if action == "labeled":
|
||||||
|
action_desc = "labeled as '%s'" % data["label"]["name"]
|
||||||
|
elif action == "unlabeled":
|
||||||
|
action_desc = "unlabeled as '%s'" % 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 = data["issue"]["html_url"]
|
url = data["issue"]["html_url"]
|
||||||
|
|
Loading…
Reference in a new issue