TINYDOC-3514 - Add PR-time link checking to preview workflow - #4277
Draft
kemister85 wants to merge 4 commits into
Draft
TINYDOC-3514 - Add PR-time link checking to preview workflow#4277kemister85 wants to merge 4 commits into
kemister85 wants to merge 4 commits into
Conversation
Validate the external links a PR adds or changes in .adoc source before merge. A step extracts URLs from the PR diff (handling AsciiDoc url[text] macros, ignoring xref internals and self-links) and lychee checks only those, so the changed link is verified once regardless of how many pages include it. - preview_create.yml: fetch full history for the diff; add extract + check steps after the preview upload (non-blocking, fail: false) - .lychee.toml / .lycheeignore: checker config and curated ignore list - package.json: check-links script for local use - .gitignore: ignore the local lychee cache and report output
grep -c on an empty changed-links.txt printed 0 and exited 1, so the fallback also fired and wrote a stray line to GITHUB_OUTPUT (Invalid format). Use wc -l, which returns a single value and exits cleanly.
This was referenced Aug 20, 2026
kemister85
force-pushed
the
hotfix/8/TINYDOC-3514
branch
from
August 20, 2026 02:18
7d7002f to
811caf6
Compare
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.
Ticket: TINYDOC-3514
What this does
Adds the PR-time link check. The preview job already builds the site, so lychee runs over the built HTML (
build/docs/tinymce/latest) and sees only real<a href>anchors — URLs inside[source]code samples, and Antora attributes substituted at build time, cannot reach the checker by construction.The diff is still computed, but only to scope the report to links the PR touched. Because it filters rendered anchors rather than feeding the checker, a malformed match cannot manufacture a failure — only miss one, which the weekly scan (#4276) covers.
Non-blocking at rollout; flip the marked line to
exit 1once the baseline is clean. The report step iscontinue-on-error, so a checker fault can never fail the preview deployment.Layer 2 of 2.
Validation
[source,js]block — alongside live links, anxref:, a self-link, a bot-hostile host and five further code-sample URLs. Result: 1 reported, the prose anchor..adochistory, every one a false positive with no genuine rot among them..lychee.tomland.lycheeignoreare byte-identical to TINYDOC-3514 - Add scheduled link checking to CI #4276.Follow-up: config needs replicating to
tinymce/7,/6and/5.