Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/config/lychee.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ include_fragments = true

remap = [
# workaround for https://github.com/lycheeverse/lychee/issues/1729
"https://github.com/(.*?)/(.*?)/blob/(.*?)/(.*#.*)$ https://raw.githubusercontent.com/$1/$2/$3/$4"
'https://github.com/(.*?)/(.*?)/blob/(.*?)/(.*#.*)$ https://raw.githubusercontent.com/$1/$2/$3/$4'
]

exclude = [
Expand Down
17 changes: 13 additions & 4 deletions .github/workflows/reusable-link-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
fetch-depth: 0 # needed for merge-base used in lint:links-in-modified-files

- name: Setup mise
uses: jdx/mise-action@e3d7b8d67a7958d1207f6ed871e83b1ea780e7b0 # v3.3.1
- uses: jdx/mise-action@e3d7b8d67a7958d1207f6ed871e83b1ea780e7b0 # v3.3.1

- name: Run link check
run: mise run link-check
- name: Link check - relative links (all files)
if: github.event_name == 'pull_request'
env:
GITHUB_TOKEN: ${{ github.token }}
run: mise run lint:local-links

- name: Link check (modified files only)
env:
GITHUB_TOKEN: ${{ github.token }}
run: mise run lint:links-in-modified-files --base origin/${{ github.base_ref }} --head ${{ github.event.pull_request.head.sha }} --event ${{ github.event_name }}
18 changes: 15 additions & 3 deletions mise.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
[tools]
lychee = "0.20.1"

[tasks.link-check]
run = 'lychee --verbose --config .github/config/lychee.toml .'

[settings]
# Only install tools explicitly defined in the [tools] section above
idiomatic_version_file_enable_tools = []

# Windows configuration for file-based tasks
# Based on: https://github.com/jdx/mise/discussions/4461
windows_executable_extensions = ["sh"]
windows_default_file_shell_args = "bash"
use_file_shell_for_executable_tasks = true

[tasks."lint:links"]
file = "https://raw.githubusercontent.com/open-telemetry/opentelemetry-java-contrib/refs/heads/main/.mise/tasks/lint/links.sh"

[tasks."lint:local-links"]
file = "https://raw.githubusercontent.com/open-telemetry/opentelemetry-java-contrib/refs/heads/main/.mise/tasks/lint/local-links.sh"

[tasks."lint:links-in-modified-files"]
file = "https://raw.githubusercontent.com/open-telemetry/opentelemetry-java-contrib/refs/heads/main/.mise/tasks/lint/links-in-modified-files.sh"