in bugbot/rules/bisection_without_regressed_by.py [0:0]
def is_ignorable_path(path: str) -> bool:
# TODO: also ignore other kinds of files that certainly can't cause regressions.
if any(
path.endswith(ext) for ext in (".txt", ".md", ".rst", ".pdf", ".doc", ".otf")
):
return True
# This code was adapted from https://github.com/mozsearch/mozsearch/blob/2e24a308bf66b4c149683bfeb4ceeea3b250009a/router/router.py#L127
if (
"/test/" in path
or "/tests/" in path
or "/mochitest/" in path
or "/unit/" in path
or "/gtest/" in path
or "testing/" in path
or "/jsapi-tests/" in path
or "/reftests/" in path
or "/reftest/" in path
or "/crashtests/" in path
or "/crashtest/" in path
or "/gtests/" in path
or "/googletest/" in path
):
return True
return False