Skip to content

feat: Add Broken Link Checker workflow for Markdown files #1835

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 23, 2025

Conversation

Vamshi-Microsoft
Copy link
Contributor

Purpose

This pull request adds a new GitHub Actions workflow to automatically check for broken links in Markdown files. The workflow supports two triggers: pull requests and manual runs.

New workflow addition:

  • .github/workflows/broken-links-checker.yml: Created a workflow named "Broken Link Checker" that runs on pull requests to check for broken links in added or modified Markdown files, and supports manual execution to check all Markdown files in the repository. It uses the lychee-action for link validation and includes configurations for verbose output, excluding email links, and ignoring certain URL patterns.

Does this introduce a breaking change?

  • Yes
  • No

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds a GitHub Actions workflow that automatically validates links in Markdown files on pull requests and manual runs.

  • Introduces .github/workflows/broken-links-checker.yml with pull_request and workflow_dispatch triggers.
  • Uses lychee-action to check only changed MD files on PRs and all MD files when run manually.
Comments suppressed due to low confidence (3)

.github/workflows/broken-links-checker.yml:24

  • Step IDs in GitHub Actions should use only alphanumeric characters and underscores. Rename changed-files to something like changed_files to avoid errors.
        id: changed-files

.github/workflows/broken-links-checker.yml:49

  • The workflow writes lychee/out.md but doesn’t use or upload it. Consider adding an upload-artifact step or removing the output path if it’s not needed.
          output: lychee/out.md

.github/workflows/broken-links-checker.yml:37

  • [nitpick] Using --exclude ^https?:// skips all HTTP/HTTPS links, so external link checks are ignored. If you only want to exclude specific domains or patterns, refine this regex.
            --verbose --exclude-mail --no-progress --exclude ^https?://

@Prajwal-Microsoft Prajwal-Microsoft added this pull request to the merge queue Jun 23, 2025
Merged via the queue into main with commit b3eb373 Jun 23, 2025
10 checks passed
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.

2 participants