in bugbot/rules/inactive_ni_pending.py [0:0]
def get_action_type(bug, inactive_ni):
"""
Determine if should forward needinfos to the triage owner, clear the
needinfos, or close the bug.
"""
if (
bug["priority"] in HIGH_PRIORITY
or bug["severity"] in HIGH_SEVERITY
or bug["last_change_time"] >= RECENT_BUG_LIMIT
or any(keyword in SECURITY_KEYWORDS for keyword in bug["keywords"])
):
return NeedinfoAction.FORWARD
if (
len(bug["needinfo_flags"]) == 1
and bug["type"] == "defect"
and inactive_ni[0]["requestee"] == bug["creator"]
and not inactive_ni[0]["requestee_canconfirm"]
and not any(
attachment["content_type"] == "text/x-phabricator-request"
and not attachment["is_obsolete"]
for attachment in bug["attachments"]
)
and not was_unconfirmed(bug)
):
return NeedinfoAction.CLOSE_BUG
if bug["severity"] == "--":
return NeedinfoAction.FORWARD
return NeedinfoAction.CLEAR