Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade link checker to open an issue if there are broken links #15

Open
Tracked by #11
anjackson opened this issue Apr 9, 2024 · 4 comments
Open
Tracked by #11
Assignees
Labels
bug Something isn't working

Comments

@anjackson
Copy link
Contributor

anjackson commented Apr 9, 2024

The linting workflow includes a link checker, but this is going off all the time and it's not helpful.

 ERROR: 10 dead links found!
[✖] https://twitter.com/anjacks0n/status/809343452995522560 → Status: 400
[✖] https://twitter.com/CriticalSteph/status/809365764549595136 → Status: 400
[✖] https://twitter.com/pnwagner/status/809356219471302656 → Status: 400
[✖] https://twitter.com/d_n_t → Status: 400
[✖] https://twitter.com/C_Fryer/status/809547404366192642 → Status: 400
[✖] https://twitter.com/DavidUnderdown9/lists/digipres1 → Status: 400
[✖] https://twitter.com/An_Old_Hand/lists/digi-pres-rdm → Status: 400
[✖] https://twitter.com/digipresnews/followers → Status: 400
[✖] https://twitter.com/NKrabben/lists → Status: 400
[✖] https://twitter.com/XFR_collective → Status: 400

These links are not really dead. It's just Twitter blocking things.

@anjackson anjackson added the bug Something isn't working label Apr 9, 2024
@anjackson anjackson self-assigned this Apr 9, 2024
anjackson added a commit to anjackson/awesome-digital-preservation that referenced this issue Apr 10, 2024
anjackson added a commit that referenced this issue Apr 10, 2024
Attempt to igore twitter links during checking, for #15.
@anjackson
Copy link
Contributor Author

Just tweaking the config seems to be sufficient.

@anjackson
Copy link
Contributor Author

Hmm, also looking at digipres/policies#10 (comment) and I think a more sophisticated solution is justified.

The main reason for this is that workflow error notifications only go to whoever touched the workflow last, which is not really appropriate in this case. What we really want is a link checking approach we can use across multiple repos and that will record the results as a GitHub issue.

After spending some time exploring the different GitHub Actions currently available, this seems to be a really good approach: https://github.com/marketplace/actions/lychee-broken-link-checker

It can to HTML as well as Markdown, and is more configurable, e.g. caching and setting retry-delays (which have caused problems here, forcing me to switch-off checks for some URLs because the current process was retrying too fast and couldn't be slowed down).

The only problem seems to be implemented as-is, it will add a new issue every time it runs, even if there's already an open issue. However, it may be possible to combine it with https://github.com/JasonEtco/create-an-issue to find an existing issue and pass the steps.[ID].outputs.number on as the issue-number to add the link report to the body of the issue.

@anjackson anjackson reopened this Apr 12, 2024
@anjackson anjackson changed the title Change or switch out link checker Upgrade link checker to open an issue if there are broken links Apr 12, 2024
@anjackson
Copy link
Contributor Author

Another transient false-positive today log. Presumably the DOI resolver didn't like us going too fast.

@anjackson
Copy link
Contributor Author

Another Lychee GitHub Action here: https://github.com/lycheeverse/lychee-action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant