From 5c249ac6d65e96366f3118a1e3e1801d1b54005f Mon Sep 17 00:00:00 2001 From: jesopo Date: Wed, 29 Jan 2020 11:12:56 +0000 Subject: 'type'->'object'; 'type' is already in use --- modules/git_webhooks/gitlab.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/git_webhooks/gitlab.py b/modules/git_webhooks/gitlab.py index 007b56f4..644ce823 100644 --- a/modules/git_webhooks/gitlab.py +++ b/modules/git_webhooks/gitlab.py @@ -194,12 +194,12 @@ class GitLab(object): elif type == "MergeRequest": self._note(full_name, data, data["merge_request"]) - def _note(self, full_name, data, type): - number = utils.irc.color("#%s" % type["iid"], colors.COLOR_ID) + def _note(self, full_name, data, object): + number = utils.irc.color("#%s" % object["iid"], colors.COLOR_ID) type = data["object_attributes"]["noteable_type"] type == "issue" if type == "Issue" else "MR" - title = type["title"] + title = object["title"] commenter = utils.irc.bold(data["user"]["username"]) url = data["object_attributes"]["url"] return [["[%s] %s commented on %s: %s" % -- cgit v1.3.1-10-gc9f91