infra: fix doc imports ci (#20629)

This commit is contained in:
Erick Friis
2024-04-18 16:42:03 -07:00
committed by GitHub
parent 3425988de7
commit 726234eee5
4 changed files with 8 additions and 3 deletions

View File

@@ -19,6 +19,7 @@ if __name__ == "__main__":
"test": set(),
"extended-test": set(),
}
docs_edited = False
if len(files) == 300:
# max diff length is 300 files - there are likely files missing
@@ -76,6 +77,8 @@ if __name__ == "__main__":
"an update for this new library!"
)
elif any(file.startswith(p) for p in ["docs/", "templates/", "cookbook/"]):
if file.startswith("docs/"):
docs_edited = True
dirs_to_run["lint"].add(".")
outputs = {
@@ -84,6 +87,7 @@ if __name__ == "__main__":
),
"dirs-to-test": list(dirs_to_run["test"] | dirs_to_run["extended-test"]),
"dirs-to-extended-test": list(dirs_to_run["extended-test"]),
"docs-edited": "true" if docs_edited else "",
}
for key, value in outputs.items():
json_output = json.dumps(value)