Skip to content

feat: add markdown-link-check action - #78

Merged
blink1073 merged 3 commits into
Calysto:mainfrom
blink1073:markdown-link-check
Oct 9, 2026
Merged

blink1073 merged 3 commits into
Calysto:mainfrom
blink1073:markdown-link-check

Conversation

@blink1073

Copy link
Copy Markdown
Contributor

References

Description

Adds a new reusable composite action, markdown-link-check, which checks the links in every .md file using markdown-link-check. Dead links fail the job.

Bundled defaults ignore ^https://github.com and ^https://nbviewer.org/ links, retry on HTTP 429, and treat 200, 206, and 403 as alive. A repo-root .markdown_link_config.json is merged with those defaults: its top-level keys override the defaults, while ignorePatterns is 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, installs markdown-link-check@<version>, and checks all .md files. Inputs: version (default 3.15.0), folder-path (default .), ignore-paths (default node_modules,.git), and use-quiet-mode (default no).
  • 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 a Test merge_config.py step to the test_scripts job and a dogfooding test_markdown_link_check job (added to tests_check.needs).
  • README.md and CLAUDE.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(...)" validates action.yml and .github/workflows/tests.yml.

just lint-all could not be run locally because Poetry/pre-commit are not installed in this environment; git diff --check reports no whitespace errors.

AI usage

  • Some or all of the content of this PR was generated by AI.
  • The human author has carefully reviewed this PR and run this code.
  • AI tools and models used: opencode (deepseek-v4p1-flash)

Comment thread actions/markdown-link-check/action.yml Fixed
Comment thread actions/markdown-link-check/action.yml Fixed
@blink1073 blink1073 added the enhancement New feature or request label Oct 9, 2026
@greptile-apps

greptile-apps Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium impact] The changes since the previous review appear safe to merge.

Summary

Adds markdown-link-check with bundled defaults, support for a repository config, and configurable scanning inputs.

  • Moves version into a quoted environment variable.
  • Rejects missing or non-string pattern values and adds regression tests.
  • Adds local fixtures for nested files, ignored folders, dead links, and clean scans.
  • The previous threads are unnumbered, so they have no entries in previousFindings. The version and pattern findings are addressed. The scanning fixtures cover the scenarios requested by the testing finding.
  • No new actionable issues were established. Tests were not run during this review.

Reviews (2) · Last reviewed commit: "chore: silence zizmor adhoc-packages not..." · Reviewed by Greptile

Comment thread actions/markdown-link-check/action.yml Outdated
Comment thread actions/markdown-link-check/merge_config.py Outdated
Comment thread .github/workflows/tests.yml
- 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).
@blink1073
blink1073 marked this pull request as ready for review October 9, 2026 15:55
@blink1073
blink1073 merged commit a34d825 into Calysto:main Oct 9, 2026
25 checks passed
@blink1073
blink1073 deleted the markdown-link-check branch October 9, 2026 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants