DenverCoder1 / github-readme-streak-stats

🔥 Stay motivated and show off your contribution streak! 🌟 Display your total contributions, current streak, and longest streak on your GitHub profile README
https://streak-stats.demolab.com
MIT License
4.66k stars 720 forks source link

Streak Incorrectly Updated #475

Closed kmanjt closed 1 year ago

kmanjt commented 1 year ago

Describe the bug My streak has reset to 1 day despite it being continued to 91 days

To Reproduce Steps to reproduce the behavior:

  1. My streak (https://streak-stats.demolab.com/?user=kmanjt) is showing 1 day despite it being 91 days

Expected behavior 91 day streak should be shown instead of 1 - I have tested using a different endpoint with more customisations, which also showed the same.

Screenshots image image

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context This has not happened before.

DenverCoder1 commented 1 year ago

The GitHub API shows that you have no contributions on March 19

image

Please see the relevant FAQ section for ways to fix it

https://github.com/DenverCoder1/github-readme-streak-stats/blob/main/docs/faq.md#why-doesnt-my-streak-stats-match-my-contribution-graph

kmanjt commented 1 year ago

Hi @DenverCoder1 thank you for the speedy response - I am confused, this is not a time zone issue - there is a public contribution on that date.

image

DenverCoder1 commented 1 year ago

It doesn't matter what the contribution graph shows. As I have pointed out, it shows differently when I view your profile.

What matters is what the GitHub GraphQL API returns and it shows similar to the chart I see that are no contributions on March 19. This means either the contribution is not public or the contribution is being counted for a different day on the API due to a timezone difference (the GitHub GraphQL API returns contributions for a timezone other than your local timezone).

kmanjt commented 1 year ago

Hi @DenverCoder1 okay thank you for the clarification. I have added new commits to a repository for midday on the 19th - my graph is still only showing the 1 contribution for that day however - could you please verify if the issue is now resolved?

DenverCoder1 commented 1 year ago

The API is still showing 0 contributions (two on March 18, none on March 19, two on March 20)

{
    "contributionDays": [
        {
            "contributionCount": 0,
            "date": "2023-03-19"
        },
        {
            "contributionCount": 2,
            "date": "2023-03-20"
        }
    ]
},
kmanjt commented 1 year ago

@DenverCoder1 thank you, I have followed all of the options outlined in the FAQ to resolve this and all of the changes are still showing as coming from today instead of the 19th.

GIT_COMMITTER_DATE="2022-03-19T14:30:00+00:00" git commit --amend --no-edit --date "2022-03-19T12:30:00+00:00" --allow-empty 
git push --force

and

git commit --date="2022-08-02 12:00" -m "Test commit" --allow-empty
git push

EDIT: Testing on a different repository using the following appears to have worked, awaiting verification:

git commit --date="1 day ago" -m "test" --allow-empty 
git push
kmanjt commented 1 year ago

@DenverCoder1 thank you for all of your patience and assistance. Update streak has returned - perhaps FAQ should include the following as none of the other options worked for me:

git commit --date="1 day ago" -m "test" --allow-empty 
git push
DenverCoder1 commented 1 year ago

Looks like from your reply you may have not changed the date to the date it needed to be, eg. changing "2022-08-02" to "2023-03-19", possibly the year was wrong? In any case, glad you got it working 👍

kmanjt commented 1 year ago

In my own testing I did use the correct date and it still did not work- apologies for confusion I just pasted that from your FAQ. Marking issue as closed, thank you!