Repository navigation
ci: Fail PRs that add an underscore to a docs/ file or folder name - #2063
Closed
marcleblanc2 wants to merge 1 commit into
Closed
marcleblanc2 wants to merge 1 commit into
marcleblanc2 wants to merge 1 commit into
Conversation
dev/check-filenames.mjs already fails the Vercel build on an underscore under docs/, but only Vercel team members can read that log. Run the same script as a GitHub PR check, and annotate the offending paths on the Files changed tab. Replace the script's glob import with fs.readdirSync(recursive) so the workflow needs no install step, and report an underscored folder once rather than every file under it. Amp-Thread-ID: https://ampcode.com/threads/T-01a0fe12-a1a1-7090-a749-5db8a1a35dc0 Co-authored-by: Amp <amp@ampcode.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
marcleblanc2
marked this pull request as draft
October 2, 2026 19:39
Contributor
Author
|
Closing: dev/check-filenames.mjs already fails the Vercel build on an underscore in a docs/ file or folder name, so this check would only duplicate it on the GitHub side. |
This branch was successfully deployed
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.
What
A new PR check,
Check filenames, that fails when a file or folder name underdocs/contains an underscore. It runs the samedev/check-filenames.mjsthatpnpm run buildalready runs, so the PR check and the Vercel build agree on what's a bad name, and the offending paths get a::errorannotation on the Files changed tab.Why
pnpm run buildalready fails on an underscore underdocs/, but only Vercel team members can read that log. Underscores indocs/paths become underscores in URLs, which we're cleaning up in #2059 and #2061; this stops new ones landing.Changes
.github/workflows/check-filenames.yml: checks out the PR head and runs the script. No install stepdev/check-filenames.mjs: replace theglobimport withfs.readdirSync(…, {recursive: true})so the workflow needs no dependencies; report an underscored folder once rather than every file under it; print::error file=…annotations under GitHub ActionsAGENTS.md: mention the PR checkTest plan
main(zero underscores underdocs/)docs/zz_test/,docs/admin/bad_name.mdanddocs/admin/bad_image.pngadded: all three reported, exit 1, annotations printed whenGITHUB_ACTIONS=trueUnderscores in docs/ file and folder namesto the required checks onmain