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
31 changes: 27 additions & 4 deletions .github/workflows/external-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,45 @@ jobs:
lychee:
runs-on: ubuntu-latest
timeout-minutes: 15
env:
# --cache saves passing links to .lycheecache so the re-check below only
# re-requests the links that failed. lychee never caches a failure.
LYCHEE_ARGS: "--config lychee.toml --no-progress --cache '**/*.md' '**/*.mdx'"
steps:
- uses: actions/checkout@v4

- name: Check external links
id: lychee
uses: lycheeverse/lychee-action@v2
with:
args: "--config lychee.toml --no-progress '**/*.md' '**/*.mdx'"
args: ${{ env.LYCHEE_ARGS }}
fail: false
format: markdown
output: ./lychee-report.md
# Keep the report outside the checkout, or the re-check's '**/*.md'
# glob reads it as a docs page and lists every failure twice.
output: ${{ runner.temp }}/lychee-report.md

- name: Open or update tracking issue on broken links
# Throttled or briefly unavailable hosts (GitHub in particular) answer
# live pages with a 503, and lychee reports that without retrying. Only
# links that still fail after a pause count as broken.
- name: Wait before re-checking failures
if: steps.lychee.outputs.exit_code != 0
run: sleep 120

- name: Re-check failed links
id: recheck
if: steps.lychee.outputs.exit_code != 0
uses: lycheeverse/lychee-action@v2
with:
args: ${{ env.LYCHEE_ARGS }}
fail: false
format: markdown
output: ${{ runner.temp }}/lychee-report.md

- name: Open or update tracking issue on broken links
if: steps.lychee.outputs.exit_code != 0 && steps.recheck.outputs.exit_code != 0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[nit] If the re-check step fails before it sets its output (for example, the action errors out), steps.recheck.outputs.exit_code is ''. In an expression, '' != 0 evaluates to false, so no issue is filed and the failure goes unnoticed. Consider also checking steps.recheck.outcome == 'failure', or using steps.recheck.outputs.exit_code != '0', so the step fails closed.

uses: peter-evans/create-issue-from-file@v5
with:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[nit] If the re-check step itself errors (the action fails to install or crashes) and never sets exit_code, steps.recheck.outputs.exit_code is ''. '' != 0 evaluates true, so this step files an issue from whatever report is on disk, possibly the first-pass report. That's arguably the safe default. If you'd rather make it explicit, gate on steps.recheck.outcome == 'success' && steps.recheck.outputs.exit_code != 0, or let a failed step fail the job.

title: 🔗 Broken external links detected
content-filepath: ./lychee-report.md
content-filepath: ${{ runner.temp }}/lychee-report.md
labels: broken-links, automated
2 changes: 1 addition & 1 deletion evm/wallet-integrations/particle.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID='WALLETCONNECT_PROJECT_ID'
```

## Configuring Particle Connect

Check warning on line 80 in evm/wallet-integrations/particle.mdx

View check run for this annotation

Mintlify / Mintlify Validation (seilabs) - vale-spellcheck

evm/wallet-integrations/particle.mdx#L80

Use sentence case for headings: 'Configuring Particle Connect'.

To get started, we'll configure and initialize Particle Connect. Begin by
creating a new `ConnectKit.tsx` file in your `src` directory.
Expand Down Expand Up @@ -137,7 +137,7 @@
configured `ConnectKitProvider` component then wraps the app’s content, making
this configuration available.

## Integrate Particle Connect in Your App

Check warning on line 140 in evm/wallet-integrations/particle.mdx

View check run for this annotation

Mintlify / Mintlify Validation (seilabs) - vale-spellcheck

evm/wallet-integrations/particle.mdx#L140

Use sentence case for headings: 'Integrate Particle Connect in Your App'.

Once configured, wrap your application with the `ParticleConnectKit` component
to make the Particle Connect SDK accessible throughout the app. Update the
Expand Down Expand Up @@ -171,7 +171,7 @@
}
```

## Building the Application

Check warning on line 174 in evm/wallet-integrations/particle.mdx

View check run for this annotation

Mintlify / Mintlify Validation (seilabs) - vale-spellcheck

evm/wallet-integrations/particle.mdx#L174

Use sentence case for headings: 'Building the Application'.

With your project set up, dependencies installed, and Particle Connect
configured, you can start building in the `page.tsx` file.
Expand All @@ -179,7 +179,7 @@
In `page.tsx`, you’ll define the core features: login flow, transaction
handling, and the UI.

### Connecting the Wallet

Check warning on line 182 in evm/wallet-integrations/particle.mdx

View check run for this annotation

Mintlify / Mintlify Validation (seilabs) - vale-spellcheck

evm/wallet-integrations/particle.mdx#L182

Use sentence case for headings: 'Connecting the Wallet'.

With `layout.tsx` configured, the next step is to add a primary **Connect
Wallet** button to facilitate user login. Import `ConnectButton` from
Expand Down Expand Up @@ -213,7 +213,7 @@
export default HomePage;
```

### Sending Transactions with an EIP-1193 Provider

Check warning on line 216 in evm/wallet-integrations/particle.mdx

View check run for this annotation

Mintlify / Mintlify Validation (seilabs) - vale-spellcheck

evm/wallet-integrations/particle.mdx#L216

Use sentence case for headings: 'Sending Transactions with an EIP-1193 Provider'.

Particle Connect includes AA features out of the box, but using it with the
Particle AA SDK allows you to work with EIP-1193 providers, like `ethers`. This
Expand Down Expand Up @@ -267,7 +267,7 @@
This example demonstrates how to use an existing EIP-1193 provider, but you can
also construct a `userOp` directly with Particle Connect. For an example, refer
to the
[starter repository](https://github.com/Particle-Network/connectkit-aa-usage/blob/2017262daf297624362d51f3d50cccd3b4606ef9/app/page.tsx#L117).
[starter repository](https://github.com/Particle-Network/connectkit-aa-demo/blob/2017262daf297624362d51f3d50cccd3b4606ef9/app/page.tsx#L117).

## Full app example

Expand Down Expand Up @@ -392,7 +392,7 @@
}
```

### Available Particle Connect Hooks

Check warning on line 395 in evm/wallet-integrations/particle.mdx

View check run for this annotation

Mintlify / Mintlify Validation (seilabs) - vale-spellcheck

evm/wallet-integrations/particle.mdx#L395

Use sentence case for headings: 'Available Particle Connect Hooks'.

This example illustrates a basic use of Particle Connect. For a complete list of
available hooks, refer to the
Expand Down
16 changes: 14 additions & 2 deletions lychee.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,16 @@ exclude = [
# Don't check mailto: links (this is the default; set explicitly for clarity).
include_mail = false

# Check GitHub file links (github.com/<owner>/<repo>/blob/<ref>/<path>) against
# raw.githubusercontent.com, the CDN that serves the same file for scripted
# downloads. A missing file, ref, or repo still returns 404 there, while
# github.com's rendered blob pages are the ones that answer the checker with
# 503s for files that exist. Reports show the raw URL. A blob link must point
# at a file; the CDN returns 404 for directories, so use /tree/ for those.
remap = [
"^https://github\\.com/([^/]+)/([^/]+)/blob/([^?#]+).* https://raw.githubusercontent.com/$1/$2/$3",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[nit] The remap looks right: [^?#]+ drops ?plain=1 and #L117 anchors. One trade-off: a raw URL returns 200 for a renamed repo that only resolves through a redirect, which is exactly the drift fixed in particle.mdx here. Stale-but-redirecting blob links will stop surfacing. That's acceptable for a rot check, but worth knowing.

]

# Per-host throttling. NOTE: TOML table headers capture every key that follows
# them, so keep all top-level options above this line.
#
Expand All @@ -69,8 +79,10 @@ include_mail = false
# for pages that are perfectly fine. That produced the false positives in
# https://github.com/sei-protocol/sei-docs/issues/77. lychee does not retry a
# 503, and the GITHUB_TOKEN API fallback can only validate bare owner/repo URLs
# (not blob/tree paths), so the fix is to slow down instead. Measured cost:
# ~80 GitHub requests at one per second adds about 40 seconds to the weekly run.
# (not blob/tree paths), so slowing down is what keeps 503s rare. It does not
# stop them entirely, which is why external-links.yml re-checks every failure
# before reporting it. Measured cost: with blob links remapped above, ~45
# github.com requests at one per second keep the full run under a minute.
[hosts."github.com"]
concurrency = 2
request_interval = "1s"
Loading