in bugbot/rules/moved_to_performance.py [0:0]
def handle_bug(self, bug, data):
bugid = str(bug["id"])
has_profiler_link = any(
"https://share.firefox.dev/" in comment["text"]
for comment in bug["comments"]
if comment["creator"] == bug["creator"]
and comment["creation_time"] > self.recent_date_limit
)
has_memory_report = any(
self._is_memory_report_file(attachment)
for attachment in bug["attachments"]
if attachment["creator"] == bug["creator"]
and attachment["creation_time"] > self.recent_date_limit
and not attachment["is_obsolete"]
and not attachment["is_patch"]
)
has_troubleshooting_info = any(
self._is_troubleshooting_content(attachment)
for attachment in bug["attachments"]
if attachment["creator"] == bug["creator"]
and attachment["creation_time"] > self.recent_date_limit
and not attachment["is_obsolete"]
and not attachment["is_patch"]
)
if has_profiler_link and has_memory_report and has_troubleshooting_info:
# Nothing missing, no need to add a comment
return None
self.ni_extra[bugid] = {
"has_profiler_link": has_profiler_link,
"has_memory_report": has_memory_report,
"has_troubleshooting_info": has_troubleshooting_info,
}
return bug