'open' -> 'opened' etc for gitlab issue webhook actions
This commit is contained in:
parent
f64131a10f
commit
53b2407072
1 changed files with 8 additions and 1 deletions
|
@ -43,6 +43,13 @@ COMMENT_ACTIONS = {
|
||||||
"deleted": "deleted a comment"
|
"deleted": "deleted a comment"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ISSUE_ACTIONS = {
|
||||||
|
"open": "opened",
|
||||||
|
"close": "closed",
|
||||||
|
"reopen": "reopened",
|
||||||
|
"update": "updated"
|
||||||
|
}
|
||||||
|
|
||||||
class GitLab(object):
|
class GitLab(object):
|
||||||
def is_private(self, data, headers):
|
def is_private(self, data, headers):
|
||||||
if "project" in data:
|
if "project" in data:
|
||||||
|
@ -143,7 +150,7 @@ class GitLab(object):
|
||||||
def issues(self, full_name, data):
|
def issues(self, full_name, data):
|
||||||
number = utils.irc.color("#%s" % data["object_attributes"]["iid"],
|
number = utils.irc.color("#%s" % data["object_attributes"]["iid"],
|
||||||
colors.COLOR_ID)
|
colors.COLOR_ID)
|
||||||
action = data["object_attributes"]["action"]
|
action = ISSUE_ACTIONS[data["object_attributes"]["action"]]
|
||||||
issue_title = data["object_attributes"]["title"]
|
issue_title = data["object_attributes"]["title"]
|
||||||
author = utils.irc.bold(data["user"]["username"])
|
author = utils.irc.bold(data["user"]["username"])
|
||||||
url = data["object_attributes"]["url"]
|
url = data["object_attributes"]["url"]
|
||||||
|
|
Loading…
Reference in a new issue