github-readme-stats
github-readme-stats copied to clipboard
Added new option to get total contributions instead of recent contributions
As mentioned in #932 it seems that the contribution value according to the API documentation is 'recent' contributions.
This PR aims to add a new option to get the total number of repositories that you have contributed to.
I can add the documentation to the README files later. It is late here where I am though so I thought I'd get this up now.
Something to consider though is that this new code as to make several API calls (for me, about 27) because I have to go through all the issues and PRs and commits, and you can only get 100 at a time per API call.
This increases the average load time for me to about 8.2 seconds from 2.5 seconds, and significantly increases the number of API calls, which may become a problem for you.
Perhaps a better solution would be to make a request to github to expose the values I am looking for and make this much simpler and faster.
Anyways, I'll leave it up to you to decide if you even want to add this given the performance hit. It is an option, so it will only be a hit on those that use the option, but still.
@hallzy is attempting to deploy a commit to the github readme stats Team on Vercel.
A member of the Team first needs to authorize it.
Codecov Report
Merging #937 (e30a2ce) into master (24e5f86) will decrease coverage by
5.63%
. The diff coverage is10.20%
.
@@ Coverage Diff @@
## master #937 +/- ##
==========================================
- Coverage 93.98% 88.35% -5.64%
==========================================
Files 22 22
Lines 682 730 +48
Branches 191 201 +10
==========================================
+ Hits 641 645 +4
- Misses 37 76 +39
- Partials 4 9 +5
Impacted Files | Coverage Δ | |
---|---|---|
api/index.js | 90.47% <ø> (ø) |
|
src/fetchers/stats-fetcher.js | 47.82% <8.33%> (-43.29%) |
:arrow_down: |
src/cards/stats-card.js | 100.00% <100.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 24e5f86...e30a2ce. Read the comment docs.
The diff in code coverage reported is because I haven't added tests yet... Nor have I added documentation. I figure I'd see if this is even something you want to move ahead with first before adding that.
Something to consider though is that this new code as to make several API calls (for me, about 27) because I have to go through all the issues and PRs and commits, and you can only get 100 at a time per API call. This increases the average load time for me to about 8.2 seconds from 2.5 seconds, and significantly increases the number of API calls, which may become a problem for you.
Thats the real issue. Vercel will throw error if response takes more than 10seconds and 8.2seconds is too long for that reason, and can cause request to fail.
So i don't think this is possible right now, we need a better way to fetch the data.
Fair enough. I'll try and find a way to make a feature request for the API to make this faster and simpler.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.