'type'->'object'; 'type' is already in use

This commit is contained in:
jesopo 2020-01-29 11:12:56 +00:00
parent 67aa90fc94
commit 5c249ac6d6

View file

@ -194,12 +194,12 @@ class GitLab(object):
elif type == "MergeRequest": elif type == "MergeRequest":
self._note(full_name, data, data["merge_request"]) self._note(full_name, data, data["merge_request"])
def _note(self, full_name, data, type): def _note(self, full_name, data, object):
number = utils.irc.color("#%s" % type["iid"], colors.COLOR_ID) number = utils.irc.color("#%s" % object["iid"], colors.COLOR_ID)
type = data["object_attributes"]["noteable_type"] type = data["object_attributes"]["noteable_type"]
type == "issue" if type == "Issue" else "MR" type == "issue" if type == "Issue" else "MR"
title = type["title"] title = object["title"]
commenter = utils.irc.bold(data["user"]["username"]) commenter = utils.irc.bold(data["user"]["username"])
url = data["object_attributes"]["url"] url = data["object_attributes"]["url"]
return [["[%s] %s commented on %s: %s" % return [["[%s] %s commented on %s: %s" %