Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent contributions count between requests #750

Open
pjmartorell opened this issue Dec 17, 2024 · 1 comment
Open

Inconsistent contributions count between requests #750

pjmartorell opened this issue Dec 17, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@pjmartorell
Copy link

pjmartorell commented Dec 17, 2024

Describe the bug
I have a Github Action workflow that fetches the SVG stats from https://streak-stats.demolab.com/?user=pjmartorell&theme=transparent&mode=weekly&hide_current_streak=true&hide_longest_streak=true&border_radius=6&card_width=300
I noticed that the mentioned URL returns different results between exact same calls. See the screenshot below to see the differences.

To Reproduce
Steps to reproduce the behavior:

  1. Open the following URL multiple times in the browser: https://streak-stats.demolab.com/?user=pjmartorell&theme=transparent&mode=weekly&hide_current_streak=true&hide_longest_streak=true&border_radius=6&card_width=300
  2. Notice that when the result is not a failure, in some cases it returns a very different number of contributions

Expected behavior
The mentioned URL should return always the same result

Screenshots
Captura de pantalla 2024-12-17 a les 13 00 40

Desktop (please complete the following information):

  • OS: Mac OS Sonoma 14.4.1
  • Browser: Chrome, but also fails via cURL
  • Version 131.0.6778.109
@pjmartorell pjmartorell added the bug Something isn't working label Dec 17, 2024
@pjmartorell
Copy link
Author

pjmartorell commented Dec 17, 2024

My hypothesis is that the code calculates the total contributions by fetching data from the GitHub API year by year (since the Github API only allows data retrieval for a maximum period of one year). If some of these intermediate requests fail, the contributions from those years are not included in the total sum.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant