Bloggify / github-calendar

:bar_chart: Embed your GitHub calendar everywhere.
https://bloggify.github.io/github-calendar/example/
MIT License
1.22k stars 213 forks source link

🐛 Current streak and longest streak stuck at 369 days #139

Open franznkemaka opened 2 years ago

franznkemaka commented 2 years ago

Hi Bloggify,

thanks for the awesome lib. I've been using it for almost a year. Unfortunately, the current streak and longest streak is stuck at 369 days.

Cause: github-calendar uses github-calender-parser and it scrapes GiHub's graph and parses its content to extract the commit dates in order to create a streak count. Yet the graph can't display more days than that.

Potential solution: One potential solution is to use https://github.com/DenverCoder1/github-readme-streak-stats API to get the longest streak and current streak days. It is server-based and basically uses GitHub API to get all committed dates of the user with the best accuracy.

What do you guys think about this, should I submit a PR?

IonicaBizau commented 2 years ago

It is interesting topic... We are limited to the data we get from GitHub. We could implement a handler to be able to set it in a custom way (such the one you mentioned).

franznkemaka commented 2 years ago

Great @IonicaBizau,

I will create an API that fetches the data from GitHub and support a PR with implementations