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 -

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 /api?username=abc&token=SECRET_TOKEN because the url would be public
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.
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.
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 /api?username=abc&token=SECRET_TOKEN because the url would be public
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.
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.
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.
Just hope not everyone would have commits from 1980's like yours :laughing: your account will hit the api 42 times :laughing:
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
Is this a feture for future pr or I using some wrong parameter?
@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):".
I don't know much, but is it possible that before people use it, they have to fork it, modify the auth token and then request? So like, in future you don't have to face rate limit of 5k!? I might even be wrong, conceptually.
Hey @vasugamdha Let's discuss about rate limit on another issue maybe? you can open an issue to discuss it or hop into my discord :) https://discord.com/invite/VK4k3Br
Fixed in #211
Most helpful comment
@anuraghazra I think, at the moment it's better to change "Total Commits:" to "Total Commits (last year):".