Repository navigation
Skip r-universe links in check-link-rot - #129
Merged
Merged
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported, and the narrowly scoped workflow update documents the r-universe exclusion while preserving lychee’s default arguments.
No open issues 🎉
What changed in this PR
Updates the reusable link-rotation workflow to exclude r-universe links blocked by Cloudflare.
Changes:
- Adds an r-universe exclusion to lychee.
- Preserves lychee’s default arguments.
- Documents the exclusion rationale.
| File | Description |
|---|---|
| .github/workflows/check-link-rot.yaml | Configures lychee to skip r-universe links while retaining checks for other documentation links. |
Review effort: Lite
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.
check-link-rot.yamlhas failed on every insight PR since at least Nov 26. The only error is[403] https://easystats.r-universe.dev/from the README, and that link works in a browser. r-universe is behind a Cloudflare bot challenge, so an automated request gets a 403 (the response hascf-mitigated: challenge), and lychee can't get past it. All 11 easystats packages link to r-universe in their README and call this workflow, so any of them can fail the same way.This adds
argsto the lychee step with--exclude 'r-universe\.dev', so lychee skips r-universe links. Settingargsreplaces the action's default arguments, so the line also repeats the defaults of lychee-action v2.9.0 (--verbose --no-progress './**/*.md' './**/*.html' './**/*.rst'). A comment on the step says why. Links on other sites are still checked.To test it, I pointed insight's check-link-rot caller at this branch from a test branch on my fork. The check passed, and both r-universe links in insight's README (the r-universe page and its badge) were marked as excluded:
https://github.com/jmgirard/insight/actions/runs/46921751777
Locally, lychee 0.24.2 (the version the action uses) still reports a 404 for a GitHub link in report's README, so the check still catches failing links on other sites. actionlint is clean.