Exclude non-CI config files from check (#2887)
Previously the check was also blocking changes to GitHub actions, e.g.
https://buildkite.com/bazel/bazel-books-bazel-docs/builds/569/canvas?sid=01a0d5d2-0eac-43af-b86f-2fc084f1d103&open=false.
diff --git a/buildkite/bazelci.py b/buildkite/bazelci.py
index c3d862b..459d05c 100755
--- a/buildkite/bazelci.py
+++ b/buildkite/bazelci.py
@@ -3540,7 +3540,7 @@
return steps
modified_files = get_modified_files(os.getenv("BUILDKITE_COMMIT"))
- modified_config_files = [f for f in modified_files if is_config_file(f)]
+ modified_config_files = [f for f in modified_files if is_ci_config_file(f)]
if os.getenv("BUILDKITE_PIPELINE_SLUG", "") == "bazel-central-registry":
# BCR: Only block changes to BCR's own presubmit.yml file.
@@ -3567,7 +3567,9 @@
)
-def is_config_file(path):
+def is_ci_config_file(path):
+ if path.startswith((".github")):
+ return False
return ".bazelci" in path or path.endswith(".yml")