Closed thinkverse closed 4 years ago
@puf17640 Actually removing date-fns
and using your method doesn't show the correct year, it shows the difference between the calendar year, not the year between the two dates, my year badge should say 7
and I get 8
.
@puf17640 Actually removing
date-fns
and using your method doesn't show the correct year, it shows the difference between the calendar year, not the year between the two dates, my year badge should say7
and I get8
.
Good point, didn't think too much about it, I was about to try out if there are differences in having date-fns or not, will add it back in now! You also gave me the idea to have a few other badges that show profile info, will add them in right now too!
/repos/:user
now returns the count of public repos
Please don't force push, it's causing merge conflicts. 👍
Please don't force push, it's causing merge conflicts. 👍
I forced push over your readability/whitespace commit as I already ran lint:fix
which fixed the whitespaces and I don't think newlines are needed since readability is pretty okay imo
I thought about creating a whole repo for this but remembered that @puf17640 had
git-badges
🔥Feature
Traveling to the endpoint
years/:user
returns anSVG
with the number of years a user has been a member.Usage
To use this feature, two environmental variables need to be added
GITHUB_ID
andGITHUB_TOKEN
. Since we aren't hitting the GitHub API with OAuth we're using personal tokens to up the rate limit.Enhancements
Enhancements that could be made are caching the result from the GitHub API to limit the number of requests being made, the current rate limit is 5000 requests per hour thanks to the Basic Auth - more info available on the GitHub Docs, might be good for the time being though. 🤔
Any feedback is much appreciated, and any help with the code would be awesome. 😀 👍