actually return gitlab _note result

This commit is contained in:
jesopo 2020-02-03 19:35:54 +00:00
parent c0f5367d34
commit e65fecd1b2

View file

@ -75,8 +75,8 @@ class GitLab(object):
def event(self, data, headers): def event(self, data, headers):
event = headers["X-GitLab-Event"].rsplit(" ", 1)[0].lower() event = headers["X-GitLab-Event"].rsplit(" ", 1)[0].lower()
event = event.replace(" ", "_") event = event.replace(" ", "_")
action = None action = None
event_action = None event_action = None
@ -193,9 +193,9 @@ class GitLab(object):
def note(self, full_name, data): def note(self, full_name, data):
type = data["object_attributes"]["noteable_type"] type = data["object_attributes"]["noteable_type"]
if type == "Issue": if type == "Issue":
self._note(full_name, data, data["issue"]) return self._note(full_name, data, data["issue"])
elif type == "MergeRequest": elif type == "MergeRequest":
self._note(full_name, data, data["merge_request"]) return self._note(full_name, data, data["merge_request"])
def _note(self, full_name, data, object): def _note(self, full_name, data, object):
number = utils.irc.color("#%s" % object["iid"], colors.COLOR_ID) number = utils.irc.color("#%s" % object["iid"], colors.COLOR_ID)