mirror of
https://github.com/zed-industries/zed.git
synced 2026-05-24 05:25:18 +00:00
GitHub's commit API endpoint is rate limited to 60 requests/hour for unauthenticated users. This causes avatar loading to fail after toggling blame a few times. This PR uses GitHub's CDN avatar endpoint `https://avatars.githubusercontent.com/u/e?email={email}&s=128` instead, which doesn't count against API rate limits. The author email is already available from local git data (blame output), so no API calls are needed. - When author email is available, constructs the CDN URL directly (zero API calls) - Falls back to existing API-based behavior when email is unavailable - Adds unit tests for URL construction Closes #47590 ## Test plan - [x] `./script/clippy` passes - [x] `cargo test -p git_hosting_providers` passes (89 tests including 3 new ones i added) - [ ] Manual test: Open a file, toggle git blame, verify avatars load without hitting rate limits Release Notes: - Fixed GitHub avatar rate limiting in git blame by using CDN endpoint instead of API calls (#47590) |
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||
| LICENSE-GPL | ||