Skip to content

feat: Add repository-aware link checking - #497

Closed
joefernandez wants to merge 1 commit into
tcort:masterfrom
joefernandez:feat/repository-aware-links
Closed

feat: Add repository-aware link checking#497
joefernandez wants to merge 1 commit into
tcort:masterfrom
joefernandez:feat/repository-aware-links

Conversation

@joefernandez

Copy link
Copy Markdown

This change introduces a new feature that allows markdown-link-check to validate relative links against a manifest of project files, rather than treating them as broken web links. This is particularly useful in CI environments for checking links to new files in a pull request that do not exist publicly yet.

Key changes:

  • Adds a --file-manifest <path> command-line option to provide a newline-separated list of all files in the project.
  • The core logic in index.js now checks if a relative link points to a file in the manifest. If it does, the link is considered 'alive' and the external HTTP check is bypassed.
  • Adds a sourceFile option to track the origin of the markdown file for accurate relative path resolution.
  • Includes new tests to validate the functionality.
  • Adds a sample GitHub Actions workflow (.github/workflows/pr-link-check.yml) to demonstrate usage in a PR checking context.

This change introduces a new feature that allows `markdown-link-check` to validate relative links against a manifest of project files, rather than treating them as broken web links. This is particularly useful in CI environments for checking links to new files in a pull request that do not exist publicly yet.

Key changes:
- Adds a `--file-manifest <path>` command-line option to provide a newline-separated list of all files in the project.
- The core logic in `index.js` now checks if a relative link points to a file in the manifest. If it does, the link is considered 'alive' and the external HTTP check is bypassed.
- Adds a `sourceFile` option to track the origin of the markdown file for accurate relative path resolution.
- Includes new tests to validate the functionality.
- Adds a sample GitHub Actions workflow (`.github/workflows/pr-link-check.yml`) to demonstrate usage in a PR checking context.
@BaseMax

BaseMax commented Sep 22, 2025

Copy link
Copy Markdown
Collaborator

Hey @joefernandez can you explain more about your changes? Why we should merge and apply it and why it's important to have it in next version?

Cheers.

@BaseMax

BaseMax commented Nov 17, 2025

Copy link
Copy Markdown
Collaborator

This branch has conflicts that must be resolved

@Diolor

Diolor commented Feb 5, 2026

Copy link
Copy Markdown

This fixes #215

@BaseMax

BaseMax commented Feb 5, 2026

Copy link
Copy Markdown
Collaborator

This branch has conflicts that must be resolved

@Diolor

Diolor commented Feb 6, 2026

Copy link
Copy Markdown

Alright, you may review #558 then.

@github-actions

github-actions Bot commented May 8, 2026

Copy link
Copy Markdown

This pull request has been marked as stale because it has been open 60 days with no activity. It will be closed in 90 days unless the stale label is removed or someone adds a comment.

@github-actions github-actions Bot added the Stale label May 8, 2026
@BaseMax

BaseMax commented May 9, 2026

Copy link
Copy Markdown
Collaborator

This branch has conflicts that must be resolved

@github-actions github-actions Bot removed the Stale label May 10, 2026
@tcort

tcort commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Superseded by #558

@tcort tcort closed this Jul 28, 2026
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.

4 participants