This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch v3-2-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v3-2-test by this push:
new fc1e3795dc5 [v3-2-test] Fix static checks on SKILL.md files with YAML
frontmatter (#66275)
fc1e3795dc5 is described below
commit fc1e3795dc5f83f336fa7408bcf3054a361381e3
Author: Jarek Potiuk <[email protected]>
AuthorDate: Sat May 2 14:44:38 2026 +0200
[v3-2-test] Fix static checks on SKILL.md files with YAML frontmatter
(#66275)
The `insert-license` agentic-markdown hook on v3-2-test cannot detect
license headers placed below YAML frontmatter, so it prepends a second
license at the top of the file. That break also confuses markdownlint:
the `---` line of the frontmatter, after a blank line, gets parsed as a
setext-H2 underline, and every later `# ...` heading then fails MD003.
This started failing on v3-2-test once #66169 landed
`.github/skills/prepare-providers-documentation/SKILL.md`, which is not
on the existing per-file exclude list.
The same issue was solved on `main` in #65776 (commit 0960ad2f6d) by
passing `--detect-license-in-X-top-lines '30'` to the SHORT_LICENSE
hook so it recognises an existing license inside the first 30 lines of
the file. Backport only the `.pre-commit-config.yaml` change from that
PR — not the new `aip-user-stories` skill that shipped alongside it —
and add the matching license header inside
`.github/instructions/code-review.instructions.md` (so it does not
regress once `.github/instructions/` is no longer blanket-excluded).
---
.github/instructions/code-review.instructions.md | 2 ++
.pre-commit-config.yaml | 7 +++----
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/.github/instructions/code-review.instructions.md
b/.github/instructions/code-review.instructions.md
index cd480bdcaf7..2dc865b71be 100644
--- a/.github/instructions/code-review.instructions.md
+++ b/.github/instructions/code-review.instructions.md
@@ -2,6 +2,8 @@
applyTo: "**"
excludeAgent: "coding-agent"
---
+<!-- SPDX-License-Identifier: Apache-2.0
+ https://www.apache.org/licenses/LICENSE-2.0 -->
# Airflow Code Review Instructions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index e2dd5a91c66..0b913692a4c 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -176,6 +176,8 @@ repos:
- "||"
- --license-filepath
- scripts/ci/license-templates/SHORT_LICENSE.md
+ - --detect-license-in-X-top-lines
+ - '30'
- --fuzzy-match-generates-todo
files:
(?x)
@@ -186,10 +188,7 @@ repos:
^(?:.*/)?SKILL\.md$
exclude:
(?x)
- ^scripts/ci/license-templates/|
- ^\.github/instructions/|
- ^\.github/skills/airflow-translations/SKILL\.md$|
- ^\.github/skills/pr-triage/SKILL\.md$
+ ^scripts/ci/license-templates/
- id: insert-license
name: Add license for all other files
args: