opensafely / opensafely/documentation
Introduce link check on pull requests
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 48
- Forks
- 10
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 17
Description
Occasionally, broken links get introduced into the site, which we detect via a scheduled link check sometime they are included. It would be preferable to not introduce them at all.
To avoid this, we could check the files modified in pull request, in addition to having a regular scheduled link check.
If successful, we could also use this approach for other sites that we maintain.
Considerations:
- The Lychee GitHub Action that we use doesn't have a built-in feature for this to dete; though there are scripted workarounds, see lycheeverse/lychee-action#17
- Sometimes links aren't broken, but simply blocked because the site blocks the GitHub Actions runner and/or the Lychee client. The fix then is to add the link to the
.lycheeignore, which is less obvious. Might this be extra confusion for pull request authors?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting the existing scheduled Lychee GitHub Action workflow and the workaround discussed in lycheeverse/lychee-action#17. Determine how modified pull-request files can be checked without disrupting normal link checks, including handling links listed in .lycheeignore; done means pull requests report broken links while the scheduled check continues to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions
- Domain
- ci-cd
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100