Repository navigation
feat: add markdown-link-check action - #78
Merged
Merged
Conversation
|
- Pass the version input through an environment variable so it can't be interpolated as shell code (zizmor template-injection). - Require each ignorePatterns entry to be an object with a string pattern, with tests for the malformed shapes. - Add a fixture-based test proving nested files are scanned, ignore-paths skips folders, and dead links fail the run. - Promote the README's "Providing custom release notes" label to a heading so its anchor resolves (the dogfood job caught the dead anchor link).
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.
References
Description
Adds a new reusable composite action,
markdown-link-check, which checks the links in every.mdfile usingmarkdown-link-check. Dead links fail the job.Bundled defaults ignore
^https://github.comand^https://nbviewer.org/links, retry on HTTP429, and treat200,206, and403as alive. A repo-root.markdown_link_config.jsonis merged with those defaults: its top-level keys override the defaults, whileignorePatternsis the union of the default and user patterns (defaults first, duplicates removed). A missing config file is fine, and the default ignore patterns cannot be removed.Changes
actions/markdown-link-check/merge_config.py— stdlib helper that merges the user config with the bundled defaults and validates it.actions/markdown-link-check/action.yml— composite action that merges the config, installsmarkdown-link-check@<version>, and checks all.mdfiles. Inputs:version(default3.15.0),folder-path(default.),ignore-paths(defaultnode_modules,.git), anduse-quiet-mode(defaultno).actions/markdown-link-check/test_merge_config.sh— 9 test cases covering the defaults, union, de-duplication, overrides, and validation failures..github/workflows/tests.yml— adds aTest merge_config.pystep to thetest_scriptsjob and a dogfoodingtest_markdown_link_checkjob (added totests_check.needs).README.mdandCLAUDE.md— document the new action.Backwards-incompatible changes
None
Testing
bash actions/markdown-link-check/test_merge_config.sh— 9/9 passing.python3 -c "import yaml; yaml.safe_load(...)"validatesaction.ymland.github/workflows/tests.yml.just lint-allcould not be run locally because Poetry/pre-commit are not installed in this environment;git diff --checkreports no whitespace errors.AI usage