Skip to content

Conversation

Copy link

Copilot AI commented Jun 30, 2025

This PR applies the changes from opentelemetry-java-instrumentation PR #14155 to make it easier to run lychee link checking locally.

Changes Made

New Files Added

  • .lychee.toml - Centralized configuration file with proper timeouts, retries, and exclusions specific to the contrib repository
  • .github/scripts/check-links.sh - Executable script that runs lychee via Docker with proper configuration
  • .github/scripts/dependencies.dockerfile - Manages lychee Docker image version to enable Renovate auto-updates

Files Modified

  • .github/workflows/reusable-markdown-link-check.yml - Updated to use the new script approach instead of lychee-action
  • .github/workflows/build.yml - Updated job name from markdown-link-check to check-links to match new workflow

Benefits

For Contributors

  • 🚀 Easy local testing: Run ./.github/scripts/check-links.sh to check links locally before submitting PRs
  • 🐳 Consistent environment: Uses the exact same lychee version as CI via Docker
  • ⚙️ Centralized config: All lychee settings consolidated in .lychee.toml

For Maintainers

  • 🔄 Automatic updates: Renovate can now auto-update lychee versions via the dependencies file
  • 🎯 Better exclusions: Configured to properly exclude contrib-specific problematic URLs
  • 📊 Improved reliability: Uses Docker for consistent behavior across environments

Usage

Contributors can now easily test link checking locally:

# Run link checking on the entire repository
./.github/scripts/check-links.sh

# With GitHub token for better rate limits (optional)
GITHUB_TOKEN=your_token ./.github/scripts/check-links.sh

The script automatically:

  • Uses Docker to run the correct lychee version
  • Loads configuration from .lychee.toml
  • Handles GitHub tokens if available
  • Provides proper TTY handling for interactive use

Fixes #23.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • activemq.apache.org
    • Triggering command: /usr/local/bin/lychee --verbose --config .lychee.toml . (dns block)
  • api.scorecard.dev
    • Triggering command: /usr/local/bin/lychee --verbose --config .lychee.toml . (dns block)
    • Triggering command: /usr/local/bin/lychee --config .lychee.toml README.md (dns block)
  • app.fossa.com
    • Triggering command: /usr/local/bin/lychee --verbose --config .lychee.toml . (dns block)
    • Triggering command: /usr/local/bin/lychee --config .lychee.toml README.md (dns block)
  • cassandra.apache.org
    • Triggering command: /usr/local/bin/lychee --verbose --config .lychee.toml . (dns block)
  • central.sonatype.com
    • Triggering command: /usr/local/bin/lychee --verbose --config .lychee.toml . (dns block)
  • cloud-native.slack.com
    • Triggering command: /usr/local/bin/lychee --verbose --config .lychee.toml . (dns block)
    • Triggering command: /usr/local/bin/lychee --config .lychee.toml README.md (dns block)
  • cloud.google.com
    • Triggering command: /usr/local/bin/lychee --verbose --config .lychee.toml . (dns block)
  • contrib.rocks
  • developer.mend.io
    • Triggering command: /usr/local/bin/lychee --verbose --config .lychee.toml . (dns block)
  • docs.aws.amazon.com
    • Triggering command: /usr/local/bin/lychee --verbose --config .lychee.toml . (dns block)
  • docs.cloudfoundry.org
    • Triggering command: /usr/local/bin/lychee --verbose --config .lychee.toml . (dns block)
  • docs.groovy-lang.org
    • Triggering command: /usr/local/bin/lychee --verbose --config .lychee.toml . (dns block)
  • docs.jboss.org
    • Triggering command: /usr/local/bin/lychee --verbose --config .lychee.toml . (dns block)
  • docs.oracle.com
    • Triggering command: /usr/local/bin/lychee --verbose --config .lychee.toml . (dns block)
  • en.wikipedia.org
    • Triggering command: /usr/local/bin/lychee --verbose --config .lychee.toml . (dns block)
  • groovy-lang.org
    • Triggering command: /usr/local/bin/lychee --verbose --config .lychee.toml . (dns block)
  • hadoop.apache.org
    • Triggering command: /usr/local/bin/lychee --verbose --config .lychee.toml . (dns block)
  • hbase.apache.org
    • Triggering command: /usr/local/bin/lychee --verbose --config .lychee.toml . (dns block)
  • img.shields.io
    • Triggering command: /usr/local/bin/lychee --verbose --config .lychee.toml . (dns block)
  • kafka.apache.org
    • Triggering command: /usr/local/bin/lychee --verbose --config .lychee.toml . (dns block)
  • opentelemetry.io
    • Triggering command: /usr/local/bin/lychee --verbose --config .lychee.toml . (dns block)
  • plugins.jenkins.io
    • Triggering command: /usr/local/bin/lychee --verbose --config .lychee.toml . (dns block)
  • scorecard.dev
    • Triggering command: /usr/local/bin/lychee --verbose --config .lychee.toml . (dns block)
    • Triggering command: /usr/local/bin/lychee --config .lychee.toml README.md (dns block)
  • semver.org
    • Triggering command: /usr/local/bin/lychee --verbose --config .lychee.toml . (dns block)
  • solr.apache.org
    • Triggering command: /usr/local/bin/lychee --verbose --config .lychee.toml . (dns block)
  • tmp
    • Triggering command: /usr/local/bin/lychee --config .lychee.toml /tmp/test-links.md (dns block)
  • www.eclipse.org
    • Triggering command: /usr/local/bin/lychee --verbose --config .lychee.toml . (dns block)
  • www.jaegertracing.io
    • Triggering command: /usr/local/bin/lychee --verbose --config .lychee.toml . (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Make it easier to run lychee locally Make it easier to run lychee locally Jun 30, 2025
Copilot AI requested a review from trask June 30, 2025 00:27
Copilot finished work on behalf of trask June 30, 2025 00:27
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.

Make it easier to run lychee locally

3 participants