aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar jesopo2019-11-25 12:01:33 +0000
committerGravatar jesopo2019-11-25 12:01:33 +0000
commit531bc65889b81345c1d7ae2ad1e557b8fbad69ce (patch)
treed90fa39930971add41b2a876a976ef0754229cf2
parentswitch scripts module to no longer use set_prefix() (diff)
signature
explicitly say when an issue/PR was renamed
closes #209
-rw-r--r--modules/git_webhooks/github.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/git_webhooks/github.py b/modules/git_webhooks/github.py
index 50c31f10..5a252c65 100644
--- a/modules/git_webhooks/github.py
+++ b/modules/git_webhooks/github.py
@@ -317,6 +317,8 @@ class GitHub(object):
elif action == "labeled":
action_desc = "labled %s as '%s'" % (
identifier, data["label"]["name"])
+ elif action == "edited" and "title" in data["changes"]:
+ action_desc = "renamed %s" % identifier
pr_title = data["pull_request"]["title"]
url = self._short_url(data["pull_request"]["html_url"])
@@ -369,6 +371,8 @@ class GitHub(object):
action_str = "%s %s" % (action, number)
if action == "labeled":
action_str = "labeled %s as '%s'" % (number, data["label"]["name"])
+ elif action == "edited" and "title" in data["changes"]:
+ action_str = "renamed %s" % number
issue_title = data["issue"]["title"]
author = utils.irc.bold(data["sender"]["login"])