Skip to content

feat: add validate-docs-redirects script - #1127

Merged
David Traum (davidtraum) merged 11 commits into
mainfrom
feat/add-docs-redirect-validation
Aug 5, 2026
Merged

feat: add validate-docs-redirects script #1127
David Traum (davidtraum) merged 11 commits into
mainfrom
feat/add-docs-redirect-validation

Conversation

@davidtraum

@davidtraum David Traum (davidtraum) commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

What?

This PR adds a script to validate the redirects for the pages of the Meteor admin SDK documentation which are listed inside docs.yml.
If the redirect target is invalid by accident because the file has been moved or the path is wrong the script will fail inside the static-analysis pipeline.

Why?

Without validation it is easy to miss adding a redirect for a moved page.

How?

The script can be called using pnpm run validate:docs-redirects and is also included in the static-analysis checks.

The script does two things:

  • Checking the diff of the current branch to check, if files have been moved and dont have a redirect
  • Checking if all current redirect targets are still valid

Other small changes in this PR:

  • Adding fetch-depth: 0 is required so the full git history including origin/ is available in CI, allowing the validation script to diff the PR branch against the base branch to detect moved or deleted docs pages.)
  • One invalid redirect in the docs was corrected

Testing?

  • Run pnpm run validate:docs-redirects with the current valid docs.yml file. No error occurs.
  • Change a redirect path in the file to a non existent target
  • Run the command again -> The script exits with an error

@vercel

vercel Bot commented Apr 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
meteor-docs Ready Ready Preview Aug 5, 2026 7:12am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
meteor-component-library Ignored Ignored Preview Aug 5, 2026 7:12am
meteor-storybook Ignored Ignored Preview Aug 5, 2026 7:12am

Request Review

@davidtraum
David Traum (davidtraum) changed the base branch from main to docs-changes-mar12 April 16, 2026 07:59
@davidtraum
David Traum (davidtraum) changed the base branch from docs-changes-mar12 to main April 16, 2026 07:59
@fabianhueske

Copy link
Copy Markdown
Contributor

David Traum (@davidtraum) Is this still needed?

@davidtraum

Copy link
Copy Markdown
Contributor Author

David Traum (David Traum (@davidtraum)) Is this still needed?

Yes, it’s still relevant. I need to make a few adjustments before it’s ready. Fabian Hüske (@fabianhueske)

@davidtraum David Traum (davidtraum) changed the title feat: add validate-docs-redirects script and test feat: add validate-docs-redirects script Aug 4, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

really nice :D

@pkg-pr-new

pkg-pr-new Bot commented Aug 5, 2026

Copy link
Copy Markdown

Open in StackBlitz

@shopware-ag/meteor-admin-sdk

npm i https://pkg.pr.new/shopware/meteor/@shopware-ag/meteor-admin-sdk@1127

@shopware-ag/meteor-component-library

npm i https://pkg.pr.new/shopware/meteor/@shopware-ag/meteor-component-library@1127

@shopware-ag/create-meteor-extension

npm i https://pkg.pr.new/shopware/meteor/@shopware-ag/create-meteor-extension@1127

@shopware-ag/meteor-icon-kit

npm i https://pkg.pr.new/shopware/meteor/@shopware-ag/meteor-icon-kit@1127

@shopware-ag/meteor-prettier-config

npm i https://pkg.pr.new/shopware/meteor/@shopware-ag/meteor-prettier-config@1127

@shopware-ag/stylelint-plugin-meteor

npm i https://pkg.pr.new/shopware/meteor/@shopware-ag/stylelint-plugin-meteor@1127

@shopware-ag/meteor-tokens

npm i https://pkg.pr.new/shopware/meteor/@shopware-ag/meteor-tokens@1127

commit: b0c640b

@davidtraum
David Traum (davidtraum) merged commit 1167425 into main Aug 5, 2026
13 of 14 checks passed
@davidtraum
David Traum (davidtraum) deleted the feat/add-docs-redirect-validation branch August 5, 2026 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants