aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorGravatar jesopo2019-10-18 11:19:16 +0100
committerGravatar jesopo2019-10-18 11:19:16 +0100
commit53b24070727e35e4ab93099dbb86074f18b80e17 (patch)
treed52b3fcd58bfbf0b9a1b879af61de403abde4c03 /modules
parentsupport utf8 hostnames by punycode (idna) encoding (diff)
signature
'open' -> 'opened' etc for gitlab issue webhook actions
Diffstat (limited to 'modules')
-rw-r--r--modules/git_webhooks/gitlab.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/modules/git_webhooks/gitlab.py b/modules/git_webhooks/gitlab.py
index 1b4b3831..d1bae40e 100644
--- a/modules/git_webhooks/gitlab.py
+++ b/modules/git_webhooks/gitlab.py
@@ -43,6 +43,13 @@ COMMENT_ACTIONS = {
"deleted": "deleted a comment"
}
+ISSUE_ACTIONS = {
+ "open": "opened",
+ "close": "closed",
+ "reopen": "reopened",
+ "update": "updated"
+}
+
class GitLab(object):
def is_private(self, data, headers):
if "project" in data:
@@ -143,7 +150,7 @@ class GitLab(object):
def issues(self, full_name, data):
number = utils.irc.color("#%s" % data["object_attributes"]["iid"],
colors.COLOR_ID)
- action = data["object_attributes"]["action"]
+ action = ISSUE_ACTIONS[data["object_attributes"]["action"]]
issue_title = data["object_attributes"]["title"]
author = utils.irc.bold(data["user"]["username"])
url = data["object_attributes"]["url"]