[v3-2-test] Fix static checks on SKILL.md files with YAML frontmatter#66275
Merged
potiuk merged 1 commit intoapache:v3-2-testfrom May 2, 2026
Merged
Conversation
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 apache#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 apache#65776 (commit 0960ad2) 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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.pre-commit-config.yamlpart of Add AIP-to-user-stories skill for generating recipe playbooks from AIPs #65776 (maincommit0960ad2f6d) — adds--detect-license-in-X-top-lines '30'to theagentic-markdown
insert-licensehook so it recognises the licenseheader that sits below the YAML frontmatter, and drops the per-file
exclude workarounds that compensated for its absence.
.github/instructions/code-review.instructions.mdto match whatairflow-translations/SKILL.mdandpr-triage/SKILL.mdalready do(and what
mainalready has) so the file no longer needs to beexcluded.
v3-2-teststatic checks, which were failing oninsert-license+lint-markdownafter [v3-2-test] Add AI-driven prepare-providers-documentation skill (#65882) #66169 addedprepare-providers-documentation/SKILL.mdwithout an exclude entry.The new
aip-user-storiesskill that shipped alongside this configchange in #65776 is not backported — out of scope for v3-2-test.
Test plan
prek run insert-license --all-filespasses locallyprek run lint-markdown --all-filespasses locallyStatic checksjob goes greenWas generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 4.7) following the guidelines