-
-
Notifications
You must be signed in to change notification settings - Fork 23.2k
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
Bug: Wrong commit count #14
Comments
Hmm it should be fine.. it fetches the data from Github GraphQL api so it can't be invalid. although it is possible that you contributed to github organizations and i think those are not counted. #1 |
Ah okay, very strange because PRs count is close to correct but commit count is still far off even if you exclude org commits. |
@anshumanv i think i got it. the issue is that github only returns last years contribution commits {
user(login: "anshumanv") {
contributionsCollection(from: "2016-08-13T14:31:00Z", to:"2020-07-10T08:35:06.094Z") {
totalCommitContributions
}
}
}
I can set from and to variables in the query but github does not allow more than one year's contributions to be shown at once I have to find a way to fix this. do you have any ideas on this? |
@anshumanv what i did is that looped through all the years and fetched the commits individually and seems kinda close. |
Yes, this is the basic brute force solution but I think you'll run into API rate limit after a while if you do this for every user. |
Maybe you can give an option for users to use their own tokens? |
No i don't think i can hit the rate limit because it's already authenticated by the server... i set auth token in env. |
Also i don't think i can give users an option to add their own tokens because that would be a huge security vulnrability if someone did like this |
Yep even that doesn't give you infinite requests 😄 , IIRC you get 5k req per hour which can work for now till this gets really popular. |
Yes, only option is for user to host their own app but that seems like an overkill for now |
And anyways tokens in request params will be deprecated in near future. You have to send it in body. |
Just hope not everyone would have commits from 1980's like yours 😆 your account will hit the api 42 times 😆 |
Lol, that was when in my 1st year I committed using a messed up system clock, forgot to revert it 😥 Maybe I should take care of it real quick 😛 |
@anshumanv It's showing yearly commit for me I see not total from when I started |
@1UC1F3R616 it is currently shows 1years total commit, its a limitation of github api. checkout #15 for more info |
@anuraghazra I think, at the moment it's better to change "Total Commits:" to "Total Commits (last year):". |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Fixed in #211 |
Hey 👋
Cool project, is there a limitation to the number of commits/PRs it can fetch?
They seem to be off by quite a lot for instance -
In normal GitHub search -
The text was updated successfully, but these errors were encountered: