in libmozdata/BZInfo.py [0:0]
def __comment_handler(self, bug, bugid):
"""Handler to use with the comment retrieved from bugzilla
Args:
bug (dict): json data
data (dict): the container which will receive the data
"""
assert "comments" in bug
commenters = {}
authors = []
for comment in bug["comments"]:
text = comment["text"]
if not self.dupbug_pattern.match(text):
author = comment["author"]
authors.append(author)
if author not in commenters:
commenters[author] = []
for m in self.reply_pattern.finditer(comment["raw_text"]):
n = int(m.group(1))
if n >= 1 and n <= len(authors):
commenters[authors[n - 1]].append(author)
self.info[bugid].update({"commenters": commenters})