Fix lychee exclude-path regex patterns in link checker workflow#362
Merged
Fix lychee exclude-path regex patterns in link checker workflow#362
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Convert glob patterns to valid regex patterns: - Change '**/meta.json' to '.*/meta\.json$' - Change '**/meta.cn.json' to '.*/meta\.cn\.json$' This fixes the GitHub Actions "Check Links" workflow failure caused by invalid regex syntax. The ** glob pattern was being interpreted as a regex repetition operator without an expression. Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Use '.*meta\.json$' instead of '.*/meta\.json$' to match files both with and without directory paths. This ensures all meta.json and meta.cn.json files are properly excluded from link checking. Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Use '(^|.*/)meta\.json$' instead of '.*meta\.json$' to match only files exactly named 'meta.json', not files ending with 'meta.json' like 'custom-meta.json'. This follows the original intent of the glob pattern '**/meta.json'. Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add error handling to API endpoints
Fix lychee exclude-path regex patterns in link checker workflow
Jan 28, 2026
hotlong
approved these changes
Jan 28, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a regex parse error in the GitHub Actions link checker workflow by converting glob patterns to proper regex syntax for the --exclude-path argument in lychee.
Changes:
- Updated
--exclude-patharguments in the link checker workflow from glob patterns (**/meta.json) to valid regex patterns ((^|.*/)meta\.json$) - Applied the same fix for both
meta.jsonandmeta.cn.jsonexclusion patterns
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.
The link checker workflow fails with "regex parse error: repetition operator missing expression" because
--exclude-patharguments use glob patterns (**/meta.json) instead of valid regex.Changes
.github/workflows/check-links.yml:**/meta.json→(^|.*/)meta\.json$**/meta.cn.json→(^|.*/)meta\.cn\.json$The pattern
(^|.*/)meta\.json$matches files exactly namedmeta.jsonat any path depth while rejectingcustom-meta.jsonor similar variants.Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.