Skip to content

Conversation

Copy link

Copilot AI commented Jun 29, 2025

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

Changes

  • Added lychee.toml with minimal configuration matching the current GitHub workflow:

    • max_retries = 6
    • max_concurrency = 1
    • include_fragments = true
    • exclude pattern for GitHub issues/PRs (adapted for opentelemetry-java-contrib)
    • Only includes the comment that was present in the GitHub workflow
  • Created .github/scripts/check-links.sh script for running lychee via Docker locally

    • Extracts lychee version from dependencies.dockerfile for consistency
    • Supports optional GITHUB_TOKEN environment variable
    • Handles TTY allocation for interactive/non-interactive execution
  • Created .github/scripts/dependencies.dockerfile for Renovate to auto-update lychee versions

  • Updated workflow files:

    • Replaced reusable-markdown-link-check.yml with reusable-check-links.yml
    • Updated build.yml to reference the new workflow and job name

Usage

Developers can now run link checking locally with the same configuration as CI:

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

# Without GitHub token
./.github/scripts/check-links.sh

The script uses Docker to run lychee with the exact same version and configuration as the CI environment.

Fixes #17.


💡 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.

max_retries = 6
max_concurrency = 1

# Check fragments in links
Copy link
Collaborator

Choose a reason for hiding this comment

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

why did you include this comment?

Copy link
Author

Choose a reason for hiding this comment

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

You're right - I included an extra comment that wasn't in the original GitHub workflow. The original workflow only had the comment about excluding links for performance reasons. I've removed the unnecessary comment in 5b58f1a.

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 23:56
Copilot finished work on behalf of trask June 29, 2025 23:56
Copilot finished work on behalf of trask June 29, 2025 23:59
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