Skip to content

[v3-2-test] Fix static checks on SKILL.md files with YAML frontmatter#66275

Merged
potiuk merged 1 commit intoapache:v3-2-testfrom
potiuk:fix-static-skill-frontmatter-v3-2-test
May 2, 2026
Merged

[v3-2-test] Fix static checks on SKILL.md files with YAML frontmatter#66275
potiuk merged 1 commit intoapache:v3-2-testfrom
potiuk:fix-static-skill-frontmatter-v3-2-test

Conversation

@potiuk
Copy link
Copy Markdown
Member

@potiuk potiuk commented May 2, 2026

Summary

  • Backport the .pre-commit-config.yaml part of Add AIP-to-user-stories skill for generating recipe playbooks from AIPs #65776 (main commit
    0960ad2f6d) — adds --detect-license-in-X-top-lines '30' to the
    agentic-markdown insert-license hook so it recognises the license
    header that sits below the YAML frontmatter, and drops the per-file
    exclude workarounds that compensated for its absence.
  • Add the inner license header to
    .github/instructions/code-review.instructions.md to match what
    airflow-translations/SKILL.md and pr-triage/SKILL.md already do
    (and what main already has) so the file no longer needs to be
    excluded.
  • This unblocks v3-2-test static checks, which were failing on
    insert-license + lint-markdown after [v3-2-test] Add AI-driven prepare-providers-documentation skill (#65882) #66169 added
    prepare-providers-documentation/SKILL.md without an exclude entry.

The new aip-user-stories skill that shipped alongside this config
change in #65776 is not backported — out of scope for v3-2-test.

Test plan

  • prek run insert-license --all-files passes locally
  • prek run lint-markdown --all-files passes locally
  • CI Static checks job goes green

Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Opus 4.7)

Generated-by: Claude Code (Opus 4.7) following the guidelines

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).
@potiuk potiuk merged commit fc1e379 into apache:v3-2-test May 2, 2026
8 checks passed
@potiuk potiuk deleted the fix-static-skill-frontmatter-v3-2-test branch May 2, 2026 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant