From 4e13a5a20cdc6eb34db56f507068e28e9c8cf8ed Mon Sep 17 00:00:00 2001 From: Copilot <223556219+Copilot@users.noreply.github.com> Date: Sat, 14 Mar 2026 10:34:34 -0700 Subject: [PATCH 1/4] ci: add markdown link checking workflow Adds lychee-action to check for broken links in markdown files on PRs targeting dev or main. Includes .lychee.toml config to exclude false-positive patterns (LinkedIn, localhost, placeholder URLs). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/squad-link-check.yml | 31 +++++++++++++++++++ .lychee.toml | 42 ++++++++++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 .github/workflows/squad-link-check.yml create mode 100644 .lychee.toml diff --git a/.github/workflows/squad-link-check.yml b/.github/workflows/squad-link-check.yml new file mode 100644 index 000000000..c293116b3 --- /dev/null +++ b/.github/workflows/squad-link-check.yml @@ -0,0 +1,31 @@ +name: Squad Link Check + +on: + pull_request: + branches: [dev, main] + paths: + - '**.md' + - '**.mdx' + - 'docs/**' + - '.lychee.toml' + +permissions: + contents: read + +jobs: + link-check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Check links + uses: lycheeverse/lychee-action@v2 + with: + args: >- + --no-progress + --config .lychee.toml + '**/*.md' + '**/*.mdx' + fail: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.lychee.toml b/.lychee.toml new file mode 100644 index 000000000..0cb359889 --- /dev/null +++ b/.lychee.toml @@ -0,0 +1,42 @@ +# Lychee link checker configuration +# https://lychee.cli.rs/usage/config/ + +# Exclude node_modules and generated output +exclude_path = ["node_modules", "dist", "docs/node_modules", "docs/dist"] + +# Exclude patterns that cause false positives +exclude = [ + # Placeholder/example URLs + 'https?://example\.com', + 'https?://your-domain\.com', + 'https?://localhost', + 'https?://127\.0\.0\.1', + # LinkedIn blocks automated requests + '^https://www\.linkedin\.com', + # GitHub rate-limits unauthenticated requests + '^https://github\.com/.*/(?:issues|pull|commit)', + # npm package pages can be flaky + '^https://www\.npmjs\.com', + # Placeholder paths in code blocks + '/absolute/path/to/', + '/path/to/', + '{.*}', +] + +# Only check these file types +extensions = ["md", "mdx"] + +# Don't check email addresses +include_mail = false + +# Timeout per request +timeout = 30 + +# Max concurrent requests (be polite) +max_concurrency = 16 + +# Accept common redirect status codes +accept = ["100..=103", "200..=299"] + +# Max retries for transient failures +max_retries = 2 From 6a91f46b6f99118477786e178086660b727e2d43 Mon Sep 17 00:00:00 2001 From: Copilot <223556219+Copilot@users.noreply.github.com> Date: Sat, 14 Mar 2026 10:45:22 -0700 Subject: [PATCH 2/4] ci: pin lychee-action to v2.8.0 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/squad-link-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/squad-link-check.yml b/.github/workflows/squad-link-check.yml index c293116b3..52ac23324 100644 --- a/.github/workflows/squad-link-check.yml +++ b/.github/workflows/squad-link-check.yml @@ -19,7 +19,7 @@ jobs: - uses: actions/checkout@v4 - name: Check links - uses: lycheeverse/lychee-action@v2 + uses: lycheeverse/lychee-action@v2.8.0 with: args: >- --no-progress From 05546c16bad77109ee72f0c5671dcb02b4f82c6d Mon Sep 17 00:00:00 2001 From: Copilot <223556219+Copilot@users.noreply.github.com> Date: Sat, 14 Mar 2026 10:49:32 -0700 Subject: [PATCH 3/4] fix: escape regex braces in lychee config and drop mdx input MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Escape {.*} → \{.*\} to fix regex parse error - Remove **/*.mdx from args (no mdx files in repo) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/squad-link-check.yml | 1 - .lychee.toml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/squad-link-check.yml b/.github/workflows/squad-link-check.yml index 52ac23324..5282e5fef 100644 --- a/.github/workflows/squad-link-check.yml +++ b/.github/workflows/squad-link-check.yml @@ -25,7 +25,6 @@ jobs: --no-progress --config .lychee.toml '**/*.md' - '**/*.mdx' fail: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.lychee.toml b/.lychee.toml index 0cb359889..53e41ce63 100644 --- a/.lychee.toml +++ b/.lychee.toml @@ -20,7 +20,7 @@ exclude = [ # Placeholder paths in code blocks '/absolute/path/to/', '/path/to/', - '{.*}', + '\{.*\}', ] # Only check these file types From c5755c0d0a8d15e41e280819766f9638288de8fc Mon Sep 17 00:00:00 2001 From: Copilot <223556219+Copilot@users.noreply.github.com> Date: Sat, 14 Mar 2026 10:52:29 -0700 Subject: [PATCH 4/4] ci: set link-check to non-blocking (fail: false) Repo has ~40 pre-existing broken internal file links. Report them in the PR summary but don't block merging until they're cleaned up. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/squad-link-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/squad-link-check.yml b/.github/workflows/squad-link-check.yml index 5282e5fef..dd650f964 100644 --- a/.github/workflows/squad-link-check.yml +++ b/.github/workflows/squad-link-check.yml @@ -25,6 +25,6 @@ jobs: --no-progress --config .lychee.toml '**/*.md' - fail: true + fail: false env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}