From 2e3a53a899cdd9f680c86e2132ec4caf4463aa5b Mon Sep 17 00:00:00 2001 From: jesopo Date: Wed, 22 Jan 2020 12:45:01 +0000 Subject: support gitlab MR/issue `actions` that we don't know about --- modules/git_webhooks/gitlab.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'modules/git_webhooks/gitlab.py') diff --git a/modules/git_webhooks/gitlab.py b/modules/git_webhooks/gitlab.py index 3d9e77c3..3a2e0fc4 100644 --- a/modules/git_webhooks/gitlab.py +++ b/modules/git_webhooks/gitlab.py @@ -152,7 +152,7 @@ class GitLab(object): number = utils.irc.color("!%s" % data["object_attributes"]["iid"], colors.COLOR_ID) action = data["object_attributes"]["action"] - action_desc = "%s %s" % (ISSUE_ACTIONS[action], number) + action_desc = "%s %s" % (ISSUE_ACTIONS.get(action, action), number) branch = data["object_attributes"]["target_branch"] colored_branch = utils.irc.color(branch, colors.COLOR_BRANCH) @@ -178,7 +178,8 @@ class GitLab(object): number = utils.irc.color("#%s" % data["object_attributes"]["iid"], colors.COLOR_ID) - action = ISSUE_ACTIONS[data["object_attributes"]["action"]] + action = data["object_attributes"]["action"] + action = ISSUE_ACTIONS.get(action, action) issue_title = data["object_attributes"]["title"] author = utils.irc.bold(data["user"]["username"]) url = data["object_attributes"]["url"] -- cgit v1.3.1-10-gc9f91