Repository navigation
Lychee CI: only check changed URLs in PRs - #9614
Conversation
| echo "Changed files:" | ||
| cat changed-files.txt | ||
| # Lychee doesn't have an option for checking only the changed links, so neutralize all the other URLs of the changed files (`http` -> `hxxp`). |
There was a problem hiding this comment.
|
Looks a bit complicated, but we can give it a try. |
It wouldn't preserve the exact filenames and line numbers of the failed URLs in the summary output. |
| # Files (PHPUnit tests) | ||
| '(^|/)tests/app/Utils/httpUtilTest\.php$', |
There was a problem hiding this comment.
Added it because lychee fails to parse the file (the URLs were added when the workflow was disabled):
# Summary
| Status | Count |
|----------------|-------|
| 🔍 Total | 7024 |
| 🔗 Unique | 5246 |
| ✅ Successful | 422 |
| ⏳ Timeouts | 0 |
| 🔀 Redirected | 0 |
| 👻 Excluded | 6599 |
| ❓ Unknown | 0 |
| 🚫 Errors | 3 |
| ⛔ Unsupported | 0 |
## Errors per input
### Errors in ./tests/app/Utils/httpUtilTest.php
* [ERROR] <error:> (at 63:41) | Cannot parse 'https://example.net/"><b>' into a URL: invalid international domain name
* [ERROR] <error:> (at 64:49) | Cannot parse 'https://example.net/path?a=1&b=2' into a URL: invalid international domain name
* [ERROR] <error:> (at 65:43) | Cannot parse 'https://example.net@example.org/' into a URL: invalid international domain name
If the error is for instance Link http://abc.example.net/ is invalid, it might be sufficient (and we can even automatically grep for it afterwards if we want the filenames and lines back) |
The config rules would have to be followed too, e.g. Lines 20 to 43 in dcd40cb I know the Anyway I think that would be inconvenient, if wanting to fix the failed URLs one by one. And that approach would also scan more URLs than necessary. I guess printing the colored diff alongside would help, but it would still be harder to read than the Markdown summary. |
|
Let's try with that for now, but it would be nice we something simpler and lighter at some point |
Ref: #9209 (comment)
Only checks modified or added URLs in PRs to reduce noise. The workflow still continues to scan the entire repo for push and cron events.
Tested working in a fork PR.