diff --git a/.github/config/lychee.toml b/.github/config/lychee.toml index a6ff4e42..01c0e332 100644 --- a/.github/config/lychee.toml +++ b/.github/config/lychee.toml @@ -6,11 +6,6 @@ max_concurrency = 4 # Check link anchors 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', -] - accept = ["200..=299", "403"] exclude = [ diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 246c4572..6e561539 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -17,5 +17,17 @@ ], "labels": [ "dependencies" + ], + "customManagers": [ + { + "customType": "regex", + "datasourceTemplate": "github-tags", + "managerFilePatterns": [ + "/^mise\\.toml$/" + ], + "matchStrings": [ + "https://raw\\.githubusercontent\\.com/(?[^/]+/[^/]+)/(?[a-f0-9]{40})/.*#\\s*(?v\\S+)" + ] + } ] } diff --git a/.github/workflows/markdown-link-check.yml b/.github/workflows/markdown-link-check.yml index 21d7e891..9e658fd6 100644 --- a/.github/workflows/markdown-link-check.yml +++ b/.github/workflows/markdown-link-check.yml @@ -15,7 +15,7 @@ jobs: steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: - fetch-depth: 0 # needed for merge-base used in lint:links-in-modified-files + fetch-depth: 0 # needed for merge-base used in modified-files mode - uses: jdx/mise-action@5228313ee0372e111a38da051671ca30fc5a96db # v3.6.3 @@ -23,12 +23,12 @@ jobs: if: github.event_name == 'pull_request' env: GITHUB_TOKEN: ${{ github.token }} - run: | - mise run lint:local-links - mise run lint:links-in-modified-files --base origin/${{ github.base_ref }} --head ${{ github.event.pull_request.head.sha }} + GITHUB_HEAD_SHA: ${{ github.event.pull_request.head.sha }} + PR_HEAD_REPO: ${{ github.event.pull_request.head.repo.full_name }} + run: mise run lint:links - name: Link check for pushes and scheduled workflows if: github.event_name != 'pull_request' env: GITHUB_TOKEN: ${{ github.token }} - run: mise run lint:links + run: mise run lint:links --full diff --git a/mise.toml b/mise.toml index 249aa3ff..b785eda7 100644 --- a/mise.toml +++ b/mise.toml @@ -11,11 +11,7 @@ windows_executable_extensions = ["sh"] windows_default_file_shell_args = "bash" use_file_shell_for_executable_tasks = true +# Pick the tasks you need from flint (https://github.com/grafana/flint) [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" +description = "Check for broken links in changed files + all local links" +file = "https://raw.githubusercontent.com/grafana/flint/84e2d760286dead4e503315f9483a44fe872ee85/tasks/lint/links.sh" # v0.8.0