Repository navigation
feat: publish the offline checks as a GitHub Action for other repositories - #51
Merged
Merged
Conversation
…ories Other repositories could not consume BeautifulRepo's checks without copying scripts, and had no way to pin a version. - action.yml: composite action running repo_audit, docs_links and html_navigation from its own checkout, so the tools always match the commit the caller pinned. It uses the caller's Python 3.11+, passes inputs only through env, and rejects unknown check names. - docs_links/html_navigation never scan .git or node_modules and accept a repeatable --exclude glob; excluded files remain link destinations. - CI self-test runs the action on Ubuntu and Windows with Python 3.11, including a broken link and a typo that must fail. - guides/adopting-the-checks.md: copy-paste workflow, inputs, rollout steps and SHA pinning, linked from README and tools/README. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 22, 2026
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.
Reader problem and change
Another repository can't adopt BeautifulRepo's checks today without copying scripts, and there's no version it can pin. This PR publishes the audit and both link checks as a GitHub Action:
action.yml(composite) runstools/repo_audit.py,tools/docs_links.pyandtools/html_navigation.pyfrom the action's own checkout ($GITHUB_ACTION_PATH). Inputs:path,checks,audit-fail-on,exclude. It uses the caller's Python 3.11+ rather than installing one, so the caller's environment is left alone. Inputs reach scripts only throughenv:, which avoids expression injection. An unknown check name fails the step instead of being silently skipped.docs_links.pyandhtml_navigation.pynever scan.gitornode_modules, and accept a repeatable--exclude GLOB. Excluded files are still valid link destinations.Action self-test (ubuntu-latest | windows-latest), Python 3.11) runs the action on this repository, then on a generated fixture where a broken link and a typo inchecksmust fail, andexclude: vendormust pass. The existingPython 3.11,Python 3.14andPython 3.14 (Windows)job names are unchanged.guides/adopting-the-checks.mdcovers a copy-paste workflow, inputs, a rollout without a wall of red, and SHA pinning. It is linked from README (This repository checks itself and Maintain evidence and trust) and fromtools/README.md.Why a composite action, not a reusable workflow
A reusable workflow (
on: workflow_call) can't tell which ref the caller used, so it would need a second checkout of BeautifulRepo at a separately supplied ref, and the workflow and tool versions could drift apart. A composite action gets its tools from exactly the commit the caller pinned.Evidence
node_modulespackages: 125 and 242 findings in one, 21 and 29 in the other. After the change both pass, scanning 49 and 48 repository-owned Markdown files. The remaining real findings elsewhere were a missing screenshot and agithub.com/...link without a scheme.$GITHUB_ACTION_PATH) and on secure use (pin to a full SHA, tags can move, Dependabot updates SHA pins but does not alert on them).Verification
python tools/catalog.py→ OK).python -m unittest discover -s tests→Ran 231 tests ... OK (skipped=5)on Windows 11 / Python 3.14.7. New tests aretests/test_markdown_source_selection.py(behavior) andtests/test_action_contract.py(structure).docs_links.py→ 182 destinations across 42 files OK;html_navigation.py→ 193 OK;repo_audit.py .→ 0 findings.excludepasses, an unknown check and a bad path fail, and thepython3→pythonfallback works.Limitations
mastercommit.Proposed first release (owner decision, not done by this PR)
After merge, I suggest tagging the merge commit as
v0.1.0:Tagging would also mean replacing this CHANGELOG sentence: "not packaged releases or version tags".
🤖 Generated with Claude Code