'issue_comment' -> 'issue_note', fix issue id referencing

This commit is contained in:
jesopo 2019-10-28 12:37:21 +00:00
parent 07a3ba5222
commit d20ff91e99

View file

@ -170,10 +170,10 @@ 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 in ["Issue", "MergeRequest"]: if type in ["Issue", "MergeRequest"]:
return self.issue_comment(full_name, data) return self.issue_note(full_name, data)
def issue_note(self, full_name, data): def issue_note(self, full_name, data):
number = utils.irc.color("#%s" % data["object_attributes"]["iid"], number = utils.irc.color("#%s" % data["issue"]["id"],
colors.COLOR_ID) 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"