Skip to content

fix: encode GitHub username in events/repos API URLs#572

Open
saurabhhhcodes wants to merge 2 commits into
indresh404:mainfrom
saurabhhhcodes:fix/encode-github-username-567
Open

fix: encode GitHub username in events/repos API URLs#572
saurabhhhcodes wants to merge 2 commits into
indresh404:mainfrom
saurabhhhcodes:fix/encode-github-username-567

Conversation

@saurabhhhcodes

Copy link
Copy Markdown

Fixes #567

The GitRank page was using raw userData.githubUsername in API URLs without encoding. If a GitHub username contains special characters (hyphens are common), the API call fails silently and the streak appears as 0.

This fix wraps the username with encodeURIComponent(), matching the pattern already used in AuthContext.fetchGitHubStats.

Saurabh Kumar Bajpai added 2 commits June 17, 2026 11:38
- Add useRef debounce guard to prevent AnimatePresence panel stacking
- Use functional state update for reliable toggle behavior
The GitRank page was using raw userData.githubUsername in API URLs
without encoding. If a username contains special characters, the
API call fails silently, zeroing the streak. Wrapped with
encodeURIComponent to match AuthContext's pattern.
@vercel

vercel Bot commented Jun 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ranker-hub Ready Ready Preview, Comment Jun 17, 2026 7:27am

@github-actions github-actions Bot added backend Backend/Firebase related changes bug Something isn't working frontend Frontend related changes (HTML/CSS/JS/React) gssoc GirlScript Summer of Code gssoc26 GirlScript Summer of Code 2026 nsoc NSoC NSoC'26 NSoC 2026 pending-review PR is pending review labels Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Backend/Firebase related changes bug Something isn't working frontend Frontend related changes (HTML/CSS/JS/React) gssoc GirlScript Summer of Code gssoc26 GirlScript Summer of Code 2026 nsoc NSoC NSoC'26 NSoC 2026 pending-review PR is pending review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: fetchGitHubStats uses raw unencoded username in GitHub events API URL, silently zeroing streak

1 participant