Skip to content

[ci] Add blocking PR check for package docs using docs-builder#17879

Open
theletterf wants to merge 4 commits intomainfrom
ci/validate-package-docs
Open

[ci] Add blocking PR check for package docs using docs-builder#17879
theletterf wants to merge 4 commits intomainfrom
ci/validate-package-docs

Conversation

@theletterf
Copy link
Contributor

Summary

  • Adds .github/workflows/validate-package-docs.yml — a new blocking PR check that runs elastic/docs-builder (metadata-only + strict mode) against any packages/**/docs/*.md files changed in a PR
  • Generates a temporary docset.yml at the repo root listing only the changed files, so no static manifest needs to be maintained
  • Excludes _dev/build/ paths (those contain {{ fields }} template syntax not valid for docs-builder)
  • Exits early if no package docs changed, so unrelated PRs pay zero cost

Why

Vale linting already runs but is non-blocking (fail_on_error: false). Badly formatted Markdown or invalid docs-builder directives can slip into packages/*/docs/README.md files and break downstream consumers (EPR / integration-docs repo) silently. This check catches those issues at PR time.

Test plan

  • Open a PR modifying a packages/*/docs/README.md with intentionally broken Markdown — confirm Validate Package Docs (docs-builder) check appears and fails
  • Fix the Markdown — confirm the check passes
  • Open a PR touching only non-docs files — confirm the check is skipped

🤖 Generated with Claude Code

Adds a new workflow that validates changed packages/**/docs/*.md files
on every PR using the elastic/docs-builder action (metadata-only + strict
mode), catching Elastic-specific syntax issues before they reach EPR/downstream.

_dev/build/ template files are excluded since they contain {{ fields }}
syntax that is not valid docs-builder input.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@theletterf theletterf requested a review from a team as a code owner March 18, 2026 13:51
@theletterf theletterf marked this pull request as draft March 18, 2026 13:54
@theletterf theletterf self-assigned this Mar 18, 2026
@theletterf theletterf added the Team:Docs Label for the Observability docs team label Mar 18, 2026
@theletterf
Copy link
Contributor Author

+CC @elastic/docs-engineering @elastic/integration-docs

@theletterf theletterf marked this pull request as ready for review March 18, 2026 16:07
Narrows the path trigger from packages/**/docs/** to packages/**/docs/*.md
and tightens the grep filter to [^/]*.md$ so only top-level docs files
are validated, excluding knowledge_base/ and other subdirectories.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@theletterf
Copy link
Contributor Author

Good catch — fixed in the latest commit. Both the path trigger and the grep filter now exclude subdirectories under docs/: the trigger uses packages/**/docs/*.md (single-level * instead of **) and the grep uses [^/]*\.md$ to reject any path with a slash after docs/, so knowledge_base/ and similar subdirs are ignored.

@theletterf theletterf requested a review from mjwolf March 19, 2026 07:51
@theletterf
Copy link
Contributor Author

@elastic/ecosystem Please have a look, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Team:Docs Label for the Observability docs team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants