diff --git a/.github/config/flint.toml b/.github/config/flint.toml new file mode 100644 index 00000000000..ace835e01f0 --- /dev/null +++ b/.github/config/flint.toml @@ -0,0 +1,5 @@ +[checks.lychee] +check_all_local = true + +[settings] +setup_migration_version = 2 diff --git a/.github/workflows/reusable-link-check.yml b/.github/workflows/reusable-link-check.yml index 8ea87549c37..211aaf2e298 100644 --- a/.github/workflows/reusable-link-check.yml +++ b/.github/workflows/reusable-link-check.yml @@ -20,7 +20,9 @@ jobs: if: github.event_name == 'pull_request' env: GITHUB_TOKEN: ${{ github.token }} - GITHUB_HEAD_SHA: ${{ github.event.pull_request.head.sha }} + GITHUB_REPOSITORY: ${{ github.repository }} + GITHUB_BASE_REF: ${{ github.base_ref }} + GITHUB_HEAD_REF: ${{ github.head_ref }} PR_HEAD_REPO: ${{ github.event.pull_request.head.repo.full_name }} run: mise run lint:links diff --git a/mise.toml b/mise.toml index 0b7292ebb75..4f5ca1ac9be 100644 --- a/mise.toml +++ b/mise.toml @@ -1,6 +1,12 @@ [tools] + +# Linters +"github:grafana/flint" = "0.21.0" lychee = "0.23.0" +[env] +FLINT_CONFIG_DIR = ".github/config" + [settings] # Only install tools explicitly defined in the [tools] section above idiomatic_version_file_enable_tools = [] @@ -11,7 +17,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"] description = "Check for broken links in changed files + all local links" -file = "https://raw.githubusercontent.com/grafana/flint/feab606ce514fbbf2722cc26aeafa39956383cf3/tasks/lint/links.sh" # v0.21.0 +raw_args = true +run = "flint run"