Skip to content

Backport markdown link checker improvements#3371

Merged
tghosth merged 3 commits into
v5.0.0from
copilot/backport-markdown-link-checker
Jul 16, 2026
Merged

Backport markdown link checker improvements#3371
tghosth merged 3 commits into
v5.0.0from
copilot/backport-markdown-link-checker

Conversation

@tghosth

@tghosth tghosth commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • replace the deprecated link-checker action with direct markdown-link-check invocation
  • retry transient status-0 URL failures with curl`n- accept HTTP 202 responses from link checks

The backport excludes the unrelated JWT documentation change from #3368.

tghosth and others added 3 commits July 16, 2026 20:04
* Replace deprecated URL checker action with maintained fork

gaurav-nelson/github-action-markdown-link-check is explicitly deprecated
and points to tcort/github-action-markdown-link-check as its successor.
The new action is actively maintained by the upstream markdown-link-check
package author and uses the same config file format.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Test: add intentionally broken link to verify URL checker

This broken link should trigger a failure in the URL checker workflow,
confirming the new action correctly detects dead links. This commit
should be reverted before merging.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Debug: add verbose output and direct markdown-link-check test

- Add a step that runs markdown-link-check directly (outside Docker)
  to see raw output and verify it detects the broken link
- Disable quiet mode and enable verbose mode on the action step
- This is a temporary debug commit to be reverted

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Replace Docker-based action with direct markdown-link-check invocation

The tcort/github-action-markdown-link-check Docker action has a known
bug (#553) where markdown-link-check silently fails inside the container,
reporting all links as good without checking anything.

This replaces the action with direct npm installation and invocation of
markdown-link-check, which works correctly on the runner. Also fixes the
PR modified-files detection by using fetch-depth: 0 for proper git diff.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Remove intentionally broken test link

The URL checker has been verified to correctly detect broken links.
Removing the test link added for debugging.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* Retry status-0 URL check failures with curl before failing

The cr.yp.to links consistently fail with status 0 (connection
failure) from GitHub Actions runners despite being valid URLs.

- Increase markdown-link-check timeout from default 10s to 30s
- Add a retry step that re-checks status-0 failures using curl
  with retries, so genuine dead links still fail but servers that
  don't respond to the Node.js HTTP client get a second chance

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix pipefail: tee was swallowing markdown-link-check exit code

Adding `| tee` to capture output caused the pipeline exit code to
always be 0 (from tee), so link check failures were silently ignored.
Adding `set -o pipefail` ensures the pipeline fails when
markdown-link-check fails.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Use continue-on-error so curl retry can rescue the job

The `if: failure()` approach ran the retry step but couldn't change
the job outcome. Using `continue-on-error: true` with step ID lets
the retry step determine the final pass/fail result.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
@tghosth
tghosth merged commit 3e654f4 into v5.0.0 Jul 16, 2026
6 checks passed
@tghosth
tghosth deleted the copilot/backport-markdown-link-checker branch July 16, 2026 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant