Skip to content

Conversation

AdiGaikwad
Copy link

📌 Summary

Previously, total commits were fetched using the GitHub REST Search API.
This approach had two major issues:

  • Capped at 1000 results - incomplete data for active contributors
  • Inaccurate Commit Totals - inaccurate commit totals were given

✅ Changes

  • Replaced REST commit fetching with a GraphQL query for accurate commit counts
  • Updated unit tests & mocks to reflect GraphQL responses

🧪 Testing

  • Verified commit counts for accounts with >10k commits
  • All unit tests pass locally (npm test)
  • Confirmed caching and error message behavior in /api endpoints

📂 Files Changed

  1. src/fetchers/stats-fetcher.js → Implemented GraphQL commit fetching logic
  2. tests/fetchStats.test.js → Updated commit mocks & assertions

🔗 Related Issues

Fixes #3850

…contribution calendar graphql, edited test cases for the same
Copy link

vercel bot commented Aug 11, 2025

@AdiGaikwad is attempting to deploy a commit to the github readme stats Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions bot added the stats-card Feature, Enhancement, Fixes related to stats the stats card. label Aug 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stats-card Feature, Enhancement, Fixes related to stats the stats card.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The total number of commits displayed on my generated card is inaccurate.
1 participant