The old automation was entirely dead: .travis.yml ran awesome_bot on Travis
OSS (shut down), and .github/stale.yml targeted a defunct probot integration.
Result: dozens of dead links, years-old broken-link issues, and duplicate PRs
fixing the same link.
Adds scripts/check_readme.py, a stdlib-only Python validator that parses
README.md as structured data (grammar shared by every subcommand so lint/PR
checks/the weekly sweep can't drift apart):
- `lint`: whole-file grammar, duplicate-URL, and Table of Contents checks
- `check-diff`: flags only PR-added lines (shorteners, new http://, malformed
entries) so pre-existing link rot can't fail unrelated PRs
- `check-links`: liveness-checks URLs with a 2-strike state machine, treating
bot-hostile domains (Medium, Reddit, etc.) as BLOCKED rather than dead
- `report`: renders the weekly link-rot issue body
Wires this up via three workflows: validate-pr.yml (fork-safe PR gate),
link-rot.yml (weekly sweep, maintains one consolidated issue instead of
scattered reports), and stale-prs.yml (PRs only -- issues are explicitly
exempted, unlike the old probot config that buried broken-link reports).
Also replaces the generic issue/PR templates with ones that match what the
validator actually enforces, and fixes CONTRIBUTING.md's `*`-bullet examples
(the real source of format drift) to `-`.
Google URL Shortener was discontinued in 2019. Applied manually from
PR #897, which conflicted with the just-merged #844.
Co-authored-by: chenlichao <chenlichao@users.noreply.github.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Corrected the following phrases: 1. "a new entry in table of contents" 2. "Links must be pointing straight to the tutorials" 3. "Pull request for each of the tutorial"