github-readme-stats
github-readme-stats copied to clipboard
Adds the ability to include data from organization repositories
This PR replaced #1122. It adds the ability to include data from organization repositories.
@rickstaa 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
Patch coverage: 92.75
% and project coverage change: -0.08
:warning:
Comparison is base (
c96e84a
) 97.52% compared to head (522ec4b
) 97.44%.
Additional details and impacted files
@@ Coverage Diff @@
## master #2459 +/- ##
==========================================
- Coverage 97.52% 97.44% -0.08%
==========================================
Files 24 24
Lines 4683 4740 +57
Branches 430 434 +4
==========================================
+ Hits 4567 4619 +52
- Misses 115 120 +5
Partials 1 1
Impacted Files | Coverage Δ | |
---|---|---|
src/common/utils.js | 99.00% <86.84%> (-1.00%) |
:arrow_down: |
api/index.js | 96.19% <100.00%> (+0.07%) |
:arrow_up: |
api/top-langs.js | 95.74% <100.00%> (+0.09%) |
:arrow_up: |
src/fetchers/stats-fetcher.js | 92.08% <100.00%> (+0.32%) |
:arrow_up: |
src/fetchers/top-languages-fetcher.js | 88.95% <100.00%> (+0.27%) |
:arrow_up: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
@anuraghazra I think it would be nice to merge this after all these years, even if it is only available under an experimental env variable (see https://github.com/anuraghazra/github-readme-stats/pull/1122#issuecomment-1401638826). I'm happy to add the tests and documentation if you agree.
Hello, any news for this PR ? Do you think it could be merged soon ? Thanks !
Hello, any news for this PR ? Do you think it could be merged soon ? Thanks !
Hey, @alexleboucher, I can not say when and if it will be merged in the master branch since it still has to be reviewed by @anuraghazra, and both he and I maintain this project in our volunteered free time. However, you don't need to wait, as you can already use this PR by adding it to your fork. I already use it on my README 👍.
any update?
any update?
@Parth-1612 unfortunately, we still have to revisit this again. There are problems with both #2459 and #1122 due to how the stats and languages are currently calculated. For example, we currently only fetch the first 100 repositories in both the stats and language cards, so adding the ORG stats in the current form will make the cards less accurate. All of these issues are discussed in the following:
- https://github.com/anuraghazra/github-readme-stats/issues/1.
- https://github.com/anuraghazra/github-readme-stats/pull/1122.
- https://github.com/anuraghazra/github-readme-stats/issues/1852
- https://github.com/anuraghazra/github-readme-stats/issues/1801
We will likely merge this or #1122 and make the feature available under the new GitHub action if https://github.com/anuraghazra/github-readme-stats/issues/2179 is finished 👍🏻. You can, however, already use both #2459 and #1122 in your own forks.
I just tested the feature by merging the branch into my fork (resolving conflits), but it seems that the OWNER role doesn't work. Only COLLABORATOR and ORGANIZATION_MEMBER 🤷
I just tested the feature by merging the branch into my fork (resolving conflits), but it seems that the OWNER role doesn't work. Only COLLABORATOR and ORGANIZATION_MEMBER 🤷
Just checked your instance. Looks like all works as expected, the stats increases when adding new roles to the query string. I will add an examples below.
OWNER
<img src="https://github-readme-stats-git-master-airopis-projects.vercel.app/api?username=AiroPi&count_private=true&show_icons=true&locale=en&theme=onedark&role=OWNER" />
OWNER + ORGANIZATION_MEMBER
<img src="https://github-readme-stats-git-master-airopis-projects.vercel.app/api?username=AiroPi&count_private=true&show_icons=true&locale=en&theme=onedark&role=OWNER,ORGANIZATION_MEMBER" />
OWNER + ORGANIZATION_MEMBER + COLLABORATOR
<img src="https://github-readme-stats-git-master-airopis-projects.vercel.app/api?username=AiroPi&count_private=true&show_icons=true&locale=en&theme=onedark&role=OWNER,ORGANIZATION_MEMBER,COLLABORATOR" />
Ok I may have misunderstood how role is supposed to works then. Is "OWNER" like a default value if the "role" argument isn't provided ?
Does OWNER means "repo I am the owner of"? Or "repo from organizations I am the owner of"?
Ok I may have misunderstood how role is supposed to works then. Is "OWNER" like a default value if the "role" argument isn't provided ?
Yes, you are right, OWNER is a default value. Here is the code: https://github.com/anuraghazra/github-readme-stats/pull/2459/files#diff-658a74e9e49cfa0bc40425a3275025795e81f2492c36d010ac2662510044ce0dR444-R447
Does OWNER means "repo I am the owner of"? Or "repo from organizations I am the owner of"?
This means "Repositories that are owned by the authenticated user.". GitHub docs source: https://docs.github.com/en/graphql/reference/enums#repositoryaffiliation
Hello, any news for this PR ? Do you think it could be merged soon ? (yes, I already asked this 15 months ago 😅)
Hello, any news for this PR ? Do you think it could be merged soon ? (yes, I already asked this 15 months ago 😅)
Hey @alexleboucher. Thanks for your interest.
Honestly, I don't think that there will be any new features in the nearest time. Currently I'm alone active from the team and I don't have enought access rights to merge anything without additional approval of another collaborator.
Additionally, this pull request needs to be reworked a bit, abiltiy to include organizarions data should be accessible only on users own instances under environment varoable. Enabling this feature on public instance will cause more often downtimes due to high consumption of GitHub API token points.
Hope on your understanding and patience.
Remember that you can deploy this branch on your own Vercel instance and already use this feature.