Add script to check invalid redirect URLs in redirects.yaml

What does this MR do and why?

WHAT

  • This MR adds a script to check invalid redirect to links.
  • It tests each link against the links in public/en-us/sitemap.xml and flag any that aren't valid.
  • Use case - when doing monthly clean up task, Tech Writers can run this script to make sure that we only have valid redirects going forward.

WHY

  • This will help us check for invalid redirects that could potentially cause 404s.

NONE EXPECTED

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Configure a local GitLab Docs environment.
  2. Check out this branch.
  3. Run script node __tests__/navigation/check_redirect_links.cjs. It should flag a few URLs.

image

Cross check with public/en-us/sitemap.xml to make sure these are actually not there (I didn't see them and they do not exist in navigation BUT they are valid URLs 🤔)

Merge request acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Closes #546 (closed)

Edited by Hiru Fernando

Merge request reports

Loading