in bugbot/rules/assignee_no_login.py [0:0]
def add_action(self, bug):
prod = bug["product"]
comp = bug["component"]
default_assignee = self.default_assignees[prod][comp]
autofix = {"assigned_to": default_assignee}
# Avoid to ni if the bug has low priority and low severity.
# It's not paramount for triage owners to make an explicit decision here, it's enough for them
# to receive the notification about the unassignment from Bugzilla via email.
if (
(
bug["priority"] not in HIGH_PRIORITY
and bug["severity"] not in HIGH_SEVERITY
)
or "stalled" in bug["keywords"]
or (bug["is_old_priority"] and bug["priority"] in HIGH_PRIORITY)
):
needinfo = None
autofix["comment"] = {
"body": "The bug assignee is inactive on Bugzilla, so the assignee is being reset."
}
else:
reason = []
if bug["priority"] in HIGH_PRIORITY:
reason.append("priority '{}'".format(bug["priority"]))
if bug["severity"] in HIGH_SEVERITY:
reason.append("severity '{}'".format(bug["severity"]))
needinfo = {
"mail": bug["triage_owner"],
"nickname": bug["triage_owner_nick"],
"extra": {"reason": "/".join(reason)},
}
self.add_prioritized_action(bug, bug["triage_owner"], needinfo, autofix)