This is an automated email from the ASF dual-hosted git repository.
kaxilnaik pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 9d82363a74b Scope backport-to-v3-2-test label to PRs targeting main
(#65386)
9d82363a74b is described below
commit 9d82363a74b379f4846e5f5777ad8ea60d4bfa5c
Author: Jarek Potiuk <[email protected]>
AuthorDate: Thu Apr 16 21:27:51 2026 +0200
Scope backport-to-v3-2-test label to PRs targeting main (#65386)
Uses the per-rule `targetBranchFilter` option added in
kaxil/boring-cyborg#112 so the backport label is not applied to PRs
opened directly against the v3-2-test maintenance branch — where a
backport label is meaningless.
Also teaches the `check-boring-cyborg-configuration` prek hook about
the new `{paths, targetBranchFilter}` object form for label rules.
---
.github/boring-cyborg.yml | 25 +++++++++++++++----------
scripts/ci/prek/boring_cyborg.py | 10 ++++++++--
2 files changed, 23 insertions(+), 12 deletions(-)
diff --git a/.github/boring-cyborg.yml b/.github/boring-cyborg.yml
index 2888b199edc..0916d328ea8 100644
--- a/.github/boring-cyborg.yml
+++ b/.github/boring-cyborg.yml
@@ -348,17 +348,22 @@ labelPRBasedOnFilePath:
- .readthedocs.yml
# This should be copy of the "area:dev-tools" above minus contributing docs
and some files that should
- # only make sense in main - it should be updated when we switch maintenance
branch
+ # only make sense in main - it should be updated when we switch maintenance
branch.
+ # Scoped to PRs targeting `main` only — a PR opened directly against
v3-2-test
+ # does not need a backport-to-v3-2-test label.
backport-to-v3-2-test:
- - scripts/**/*
- - dev/**/*
- - .github/**/*
- - Dockerfile.ci
- - yamllint-config.yml
- - .dockerignore
- - .hadolint.yaml
- - .pre-commit-config.yaml
- - .rat-excludes
+ paths:
+ - scripts/**/*
+ - dev/**/*
+ - .github/**/*
+ - Dockerfile.ci
+ - yamllint-config.yml
+ - .dockerignore
+ - .hadolint.yaml
+ - .pre-commit-config.yaml
+ - .rat-excludes
+ targetBranchFilter:
+ - ^main$
kind:documentation:
- airflow-core/docs/**/*
diff --git a/scripts/ci/prek/boring_cyborg.py b/scripts/ci/prek/boring_cyborg.py
index 4db81cc0d5c..5e9ef359ffb 100755
--- a/scripts/ci/prek/boring_cyborg.py
+++ b/scripts/ci/prek/boring_cyborg.py
@@ -46,8 +46,14 @@ if CONFIG_KEY not in cyborg_config:
raise SystemExit(f"Missing section {CONFIG_KEY}")
errors = []
-# Check if all patterns in the cyborg config are existing in the repository
-for label, patterns in cyborg_config[CONFIG_KEY].items():
+# Each label rule is either a list of glob patterns (legacy form) or an object
+# with `paths` and an optional `targetBranchFilter` (see
kaxil/boring-cyborg#112).
+# Only the glob patterns in `paths` need to exist in the repository.
+for label, rule in cyborg_config[CONFIG_KEY].items():
+ if isinstance(rule, dict):
+ patterns = rule.get("paths", [])
+ else:
+ patterns = rule
for pattern in patterns:
try:
next(Path(AIRFLOW_ROOT_PATH).glob(pattern))