github-readme-stats icon indicating copy to clipboard operation
github-readme-stats copied to clipboard

Github Stats card: Total commits count represents last 365 days, not current year as indicated

Open harry-graham opened this issue 3 years ago • 0 comments

Discussed in https://github.com/anuraghazra/github-readme-stats/discussions/2498.

Overview

On the Github Stats card, the Total Commits (2023) value suggests that it represents the total number of commits made by the user in 2023.

However, the count actually represents the total commits by the user in the last 365 days.

Demonstration of this

Github Stats cards for reference

With count_private: false:

My GitHub stats

[![My GitHub stats](https://github-readme-stats.vercel.app/api?username=harry-graham&hide=stars&show_icons=true)](https://github.com/anuraghazra/github-readme-stats)

With count_private: true:

My GitHub stats

[![My GitHub stats](https://github-readme-stats.vercel.app/api?username=harry-graham&hide=stars&count_private=true&show_icons=true)](https://github.com/anuraghazra/github-readme-stats)

Querying the API

With date range of this year only:

image

With date range of last 365 days, which matches the Github Stats cards shown above (with small difference likely due to caching):

image

harry-graham avatar Feb 05 '23 21:02 harry-graham