in bugbot/round_robin.py [0:0]
def get(self, bug, date, only_one=True, has_nick=True):
pc = bug["product"] + "::" + bug["component"]
if pc not in self.data:
mail = bug.get("triage_owner")
nick = bug.get("triage_owner_detail", {}).get("nick")
if utils.is_no_assignee(mail):
mail, nick = None, None
if mail is None and pc != "Firefox::Untriaged":
logger.error("No triage owner for {}".format(pc))
self.add_component_for_triager(pc, mail)
if has_nick:
return mail, nick if only_one else [(mail, nick)]
return mail if only_one else [mail]
cal = self.data[pc]
persons = cal.get_persons(date)
fb = cal.get_fallback_bzmail()
if not persons or all(p is None for _, p in persons):
# the fallback is the triage owner
self.add_component_for_triager(pc, [fb])
return (fb, self.get_nick(fb, pc, cal)) if has_nick else fb
bzmails = []
for _, p in persons:
bzmails.append(fb if p is None else p)
self.add_component_for_triager(pc, bzmails)
if only_one:
bzmail = bzmails[0]
if has_nick:
nick = self.get_nick(bzmail, pc, cal)
return bzmail, nick
return bzmail
if has_nick:
return [(bzmail, self.get_nick(bzmail, pc, cal)) for bzmail in bzmails]
return bzmails