Skip to content

fix: Fixed current streak showing 0 despite having commits today#903

Open
Mahreen-Ahmed wants to merge 1 commit intoDenverCoder1:mainfrom
Mahreen-Ahmed:streak-bugfix
Open

fix: Fixed current streak showing 0 despite having commits today#903
Mahreen-Ahmed wants to merge 1 commit intoDenverCoder1:mainfrom
Mahreen-Ahmed:streak-bugfix

Conversation

@Mahreen-Ahmed
Copy link
Copy Markdown

Problem

Streak shows 0 despite having commits today due to stale cached stats.

Solution

Validate cache freshness before using it. If the streak ends today and has length > 0, use cached data. Otherwise, fetch fresh stats from the GitHub API and update the cache.

Testing

  1. Set GITHUB_TOKEN in .env
  2. Start the PHP server
  3. Test with curl to confirm streak displays correctly

Fixes #896, #902

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stats not up to date

1 participant