Skip to content

Commit 2620531

Browse files
committed
docs: add GITHUB_TOKEN configuration instructions to README
1 parent 88e2cbb commit 2620531

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

README.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,6 @@ Download from [GitHub Releases](https://github.com/bug-ops/deps-lsp/releases/lat
9595
| Windows | x86_64 | `deps-lsp-x86_64-pc-windows-msvc.exe` |
9696
| Windows | ARM64 | `deps-lsp-aarch64-pc-windows-msvc.exe` |
9797

98-
## Supported platforms
99-
100-
Pre-built binaries are published for:
101-
102-
- Linux (x86_64, aarch64)
103-
- macOS (x86_64, Apple Silicon)
104-
- Windows (x86_64, ARM64)
105-
10698
## Feature flags
10799

108100
By default, all ecosystems are enabled. To build with specific ecosystems only:
@@ -255,6 +247,19 @@ Configure via LSP initialization options:
255247
> [!TIP]
256248
> Increase `fetch_timeout_secs` for slower networks. The per-dependency timeout prevents slow packages from blocking others. Cold start support ensures LSP features work immediately when your IDE restores previously opened files.
257249
250+
### GitHub API token
251+
252+
Some ecosystems (Swift) resolve versions via the GitHub API, which is limited to **60 requests/hour** without authentication. Set `GITHUB_TOKEN` to increase the limit to **5,000 requests/hour**:
253+
254+
```bash
255+
# Using GitHub CLI (recommended)
256+
export GITHUB_TOKEN=$(gh auth token)
257+
258+
# Or create a personal access token at https://github.com/settings/tokens
259+
# No scopes required for public repository access
260+
export GITHUB_TOKEN=ghp_...
261+
```
262+
258263
## Development
259264

260265
> [!IMPORTANT]

crates/deps-swift/src/registry.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,7 @@ impl SwiftRegistry {
5555
.ok()
5656
.map(|token| {
5757
tracing::info!("GITHUB_TOKEN detected, using authenticated GitHub API requests");
58-
vec![(
59-
reqwest::header::AUTHORIZATION,
60-
format!("Bearer {token}"),
61-
)]
58+
vec![(reqwest::header::AUTHORIZATION, format!("Bearer {token}"))]
6259
})
6360
.unwrap_or_default();
6461

0 commit comments

Comments
 (0)