Expand doc link check to .github/*.md - #75
Merged
Conversation
check_local_links() only globbed top-level *.md, silently skipping .github/PULL_REQUEST_TEMPLATE.md and the issue templates -- a relative link added there would never be checked. Also resolve links relative to the linking file's own directory rather than repo root, matching how GitHub actually renders relative markdown links.
dmccoystephenson
added a commit
that referenced
this pull request
Aug 3, 2026
check_local_links() only globbed top-level *.md, silently skipping .github/PULL_REQUEST_TEMPLATE.md and the issue templates -- a relative link added there would never be checked. Also resolve links relative to the linking file's own directory rather than repo root, matching how GitHub actually renders relative markdown links.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
check_local_links()only globbedREPO_ROOT.glob("*.md")-- top-level files only -- so.github/PULL_REQUEST_TEMPLATE.mdand the three.github/ISSUE_TEMPLATE/*.mdfiles were never checked for broken relative links. Currently none of them have links, so this was a silent coverage gap rather than an active bug, but a future edit adding one would pass CI unchecked.REPO_ROOT.rglob("*.md")(skipping.git/) to cover the whole repo.doc.parent) rather than alwaysREPO_ROOT. This matches how GitHub actually renders relative markdown links and only matters once non-root-level docs are in scope -- for the existing top-level docs,doc.parent == REPO_ROOT, so behavior is unchanged there.PULL_REQUEST_TEMPLATE.mdlocally, confirming the script now fails on it, then reverting.Research grounding
Tooling/CI-script change, not the template or a phase definition -- no RESEARCH.md finding applies.
Test plan
python3 scripts/check_docs.pypasses on the current tree.github/PULL_REQUEST_TEMPLATE.md(reverted before commit){{placeholder}}or Step changesdrafted by Claude on behalf of Daniel Stephenson