Skip to content

chore: improve link validation CI reporting#29679

Open
mvvmm wants to merge 12 commits intoproductionfrom
update-link-validation-in-build
Open

chore: improve link validation CI reporting#29679
mvvmm wants to merge 12 commits intoproductionfrom
update-link-validation-in-build

Conversation

@mvvmm
Copy link
Copy Markdown
Contributor

@mvvmm mvvmm commented Apr 7, 2026

Summary

Updates the CI link validation pipeline to use a newer version of starlight-links-validator with changes that supports JSON report output. Instead of failing the build step directly and only surfacing errors in raw CI logs, broken links are now:

  1. Written to a structured JSON report (.starlight-links-validator/errors.json) via the new reporters.json option
  2. Uploaded as a CI artifact
  3. Posted (or updated) as a formatted table comment on the PR via a new bin/post-link-validation-comment/index.ts script

The build step no longer needs continue-on-error or log-grepping to distinguish link validation failures from real build failures — the library now sets a dedicated output variable (link_validation_failed) that the CI workflow reads directly.

Images

Example workflow

1

Example PR comment

Screenshot 2026-04-09 at 1 24 46 PM

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
/.github/ @cloudflare/content-engineering, @kodster28, @mvvmm, @colbywhite, @ahaywood, @MohamedH1998
*.ts @cloudflare/content-engineering, @kodster28
* @cloudflare/pcx-technical-writing
package.json @cloudflare/content-engineering

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

@mvvmm mvvmm force-pushed the update-link-validation-in-build branch from 2ce67fa to 18b4ee8 Compare April 8, 2026 22:19
@mvvmm mvvmm changed the title Update build w starlight-link-validator changes chore: improve link validation CI reporting with PR comments Apr 8, 2026
@mvvmm mvvmm changed the title chore: improve link validation CI reporting with PR comments chore: improve link validation CI reporting Apr 9, 2026
@mvvmm
Copy link
Copy Markdown
Contributor Author

mvvmm commented Apr 9, 2026

/bonk Please review

@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk bot commented Apr 9, 2026

error: Your local changes to the following files would be overwritten by checkout:
.opencode/package-lock.json
Please commit your changes or stash them before you switch branches.
Aborting

github run

@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk bot commented Apr 9, 2026

@mvvmm Bonk workflow failed. Check the logs for details.

View workflow run · To retry, trigger Bonk again.

@mvvmm mvvmm marked this pull request as ready for review April 9, 2026 19:33
@mvvmm mvvmm requested review from a team, colbywhite and kodster28 as code owners April 9, 2026 19:33
@mvvmm mvvmm requested review from a team, MohamedH1998 and ahaywood as code owners April 9, 2026 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants