Skip to content

Conversation

Copy link

Copilot AI commented Jun 29, 2025

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

Changes

  1. Added lychee.toml configuration file - Centralizes all lychee settings that were previously scattered in workflow arguments:

    • include_fragments = true
    • max_retries = 6
    • max_concurrency = 1
    • Excludes GitHub issue/PR links for performance
  2. Created .github/scripts/check-links.sh - A new script that makes local link checking trivial:

    • Automatically extracts lychee version from dependencies.dockerfile
    • Runs lychee in Docker (no local installation needed)
    • Supports optional GITHUB_TOKEN environment variable to avoid rate limits
    • Proper TTY handling for interactive usage
    • Can check specific files/directories: ./.github/scripts/check-links.sh README.md
  3. Added .github/scripts/dependencies.dockerfile - Enables Renovate to auto-update the lychee Docker image version

  4. Updated CI workflows:

    • Replaced reusable-markdown-link-check.yml with reusable-check-links.yml
    • Updated build.yml to use the new workflow
    • CI now uses the same script and configuration as local development
  5. Added documentation - Updated CONTRIBUTING.md with instructions for local link checking

Usage

Contributors can now easily check for broken links locally:

# Check all files
./.github/scripts/check-links.sh

# Check specific files
./.github/scripts/check-links.sh README.md CONTRIBUTING.md

# With GitHub token to avoid rate limits
GITHUB_TOKEN=your_token ./.github/scripts/check-links.sh

The script runs the same lychee configuration as CI, ensuring consistency between local development and automated checks.

Fixes #3.

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)
  • app.fossa.com
    • Triggering command: /usr/local/bin/lychee --verbose --config ./lychee.toml . (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)
  • cloud.google.com
    • Triggering command: /usr/local/bin/lychee --verbose --config ./lychee.toml . (dns block)
  • contrib.rocks
    • Triggering command: /usr/local/bin/lychee --verbose --config ./lychee.toml . (dns block)
  • 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)
  • 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)
  • 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 29, 2025
Copilot AI requested a review from trask June 29, 2025 22:41
Copilot finished work on behalf of trask June 29, 2025 22:41
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