ci/redirects: Add Redirect check for PRs - #1880
Draft
marcleblanc2 wants to merge 2 commits into
Draft
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
marcleblanc2
force-pushed
the
check-redirects
branch
from
September 10, 2026 03:26
5700b7b to
38c3748
Compare
marcleblanc2
force-pushed
the
check-links-pr-check
branch
2 times, most recently
from
September 11, 2026 01:34
953692f to
492b425
Compare
This was referenced Sep 11, 2026
dev/check-redirects.mjs checks every entry in src/data/redirects.ts: source shadows a page, source has a #fragment, duplicate source, /docs prefix, chained redirect, missing destination page or heading. The workflow compares against the merge base, so only redirects a PR breaks are reported, grouped by problem with the fix explained under each heading, and posts one suggested change per fixable entry the PR added (deleted again once the finding is gone). Not part of `npm run check`: main has hundreds of pre-existing findings. Squash of the check-redirects branch rebased onto main; the check-links commits it carried are already on main. Amp-Thread-ID: https://ampcode.com/threads/T-01a08fee-74b4-76dc-aaf9-d1245d68fdc9 Co-authored-by: Amp <amp@ampcode.com>
marcleblanc2
force-pushed
the
check-redirects
branch
from
September 11, 2026 11:13
ffcc366 to
7e7552c
Compare
|
| GH_TOKEN: ${{ github.token }} | ||
| PR_NUMBER: ${{ github.event.pull_request.number }} | ||
| run: | | ||
| key='(.path + ":" + (.line | tostring) + ":" + (.body | split("\n")[0]))' |
There was a problem hiding this comment.
tostring is not in the dictionary.
Did you mean toting?
Suggested change
| key='(.path + ":" + (.line | tostring) + ":" + (.body | split("\n")[0]))' | |
| key='(.path + ":" + (.line | toting) + ":" + (.body | split("\n")[0]))' |
Please correct the spelling, or add the word to cspell-allow-list.txt if it is correct.
…ady names Amp-Thread-ID: https://ampcode.com/threads/T-01a08fee-74b4-76dc-aaf9-d1245d68fdc9 Co-authored-by: Amp <amp@ampcode.com>
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.
Linear FE-499: Fix doc site issues
Stacked on #1858 (base branch
check-links-pr-check); merge that one first.Problem
src/data/redirects.tshas ~900 entries that don't work: destination pages that no longer exist,#fragmentsin the source (browsers never send them, so the entry can never match), duplicates of an earlier source, chains to other redirects,/docs/prefixesSolution
dev/check-redirects.mjsvalidates every entry against the pages and headings indocs/#fragment, so this redirect can never match/docsredirects.tson the PR branchpnpm check-redirectsruns it locallyVerification
PR check comment in test PR: #1896 (comment)
Related
Amp threads