tech-community-slacks
tech-community-slacks copied to clipboard
Added a markdown link checker
This will allow all the links in the markdown text to be checked before a merge or commit. It can run as a pre-commit hook locally and as a PR merge check.
This should:
- Run the script inside a containerized GitHub Actions environment.
- Checks for broken links in .md files.
- Fails the PR if broken links are found.
Example output:
If a link is broken in README.md:
❌ Error: Broken links found in README.md:
- [Docs](https://example.com/invalid-page)
To set this up as a GitHub status check on PR merge:
Add a GitHub Status Check If you want GitHub to block merging until the check passes:
- Go to Repository Settings → Branch Protection Rules.
- Add "Markdown Link Check" as a required check.