Closes the loop on the link-rot sweep: previously it only ever produced a
report, leaving every fix to be typed by hand. Adds a `prune` subcommand
that applies only the two categories safe enough to fix without a human
judgment call:
- entries HARD_DEAD for 2+ consecutive weekly checks with no known redirect
-> remove the line (cascading to remove a now-empty series title too)
- entries that now redirect to a different working URL -> rewrite in place
Suspect links, secondary/prose links, and anything matching more than one
entry are left untouched for the existing manual report flow.
link-rot.yml now runs `prune` after the sweep and, if anything changed,
opens or updates a single PR from a dedicated automated/link-rot-fixes
branch (same upsert pattern as the report issue -- one running PR, not a
new one weekly). It still requires a human merge; nothing auto-lands.
Also surfaces "moved" links in the report for the first time -- previously
an OK-but-redirected URL never appeared anywhere.
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 `-`.