github-readme-stats icon indicating copy to clipboard operation
github-readme-stats copied to clipboard

fix(stats-fetcher): user's overall commits

Open Rongronggg9 opened this issue 3 years ago • 2 comments
trafficstars

  1. precise overall public commits (formerly exaggerated or decreased)
  2. precise overall private commits (formerly only the recent year) 1+2. precise overall commits including private commits
current my fork
torvalds_curr torvalds_my
tiwai_curr tiwai_my
jhedberg_curr jhedberg_my
Icenowy_curr Icenowy_my

context: https://github.com/anuraghazra/github-readme-stats/issues/564#issuecomment-1083765940 The search API is entirely unreliable and we should never use it. Though using such a traversal could potentially cause rate limits, we should still get rid of using the search API. Why? Almost all Linux kernel contributors could never use this project as you have already seen above. It is absolutely unacceptable, isn't it? If we need to avoid being rate limited, we should consider using a database to cache users' commits in the past years.

Even I and @anuraghazra are affected:

current my fork
Rongronggg9_curr Rongronggg9_my
anuraghazra_curr anuraghazra_my

If you want to check if you are affected, my deployment is https://github-readme-stats-rongronggg9.vercel.app/api

Close #518 Close #564 Close #1061 Close #1234 Close #1515

May influence #1260, #1455

Rongronggg9 avatar Apr 02 '22 20:04 Rongronggg9

@Rongronggg9 is attempting to deploy a commit to the github readme stats Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Apr 02 '22 20:04 vercel[bot]

@anuraghazra Does this look alright to merge now?

ofek avatar Jun 03 '22 04:06 ofek

Shouldn't this be marked as bug and get a higher priority for merge?

chrisK824 avatar Mar 25 '23 00:03 chrisK824

Shouldn't this be marked as bug and get a higher priority for merge?

Although this PR is correct and makes the stats' card more correct, it will break the Public Vercel instance since it costs a lot more GraphQL points (see https://docs.github.com/en/graphql/overview/resource-limitations and https://github.com/anuraghazra/github-readme-stats/issues/1471). We therefore cannot merge this PR into the main branch. This feature will likely be included in the new GitHub action when it is released (see https://github.com/anuraghazra/github-readme-stats/issues/2179).

rickstaa avatar Mar 27 '23 10:03 rickstaa

@Rongronggg9 @rickstaa may I ask you to fix conflicts here? I would really like to merge this PR to my fork master branch.

mathbunnyru avatar Apr 28 '23 07:04 mathbunnyru

I've rebased the PR. However, due to #2100 which introduced mistaken GraphQL objects in the test suite, it cannot pass the tests. I will open another PR to fix this before I can force-push the rebased commits.

Rongronggg9 avatar Apr 28 '23 11:04 Rongronggg9

I've rebased the PR. However, due to #2100 which introduced mistaken GraphQL objects in the test suite, it cannot pass the tests. I will open another PR to fix this before I can force-push the rebased commits.

Well spotted. I merged your PR 👍🏻 !

rickstaa avatar May 06 '23 08:05 rickstaa

I've squashed and rebased the PR @mathbunnyru

Rongronggg9 avatar May 06 '23 15:05 Rongronggg9

Thanks @Rongronggg9 ❤️

mathbunnyru avatar May 06 '23 15:05 mathbunnyru

Codecov Report

Patch coverage: 91.04% and project coverage change: +0.06 :tada:

Comparison is base (688f4e4) 97.35% compared to head (248be7c) 97.41%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1691      +/-   ##
==========================================
+ Coverage   97.35%   97.41%   +0.06%     
==========================================
  Files          24       24              
  Lines        4310     4341      +31     
  Branches      393      394       +1     
==========================================
+ Hits         4196     4229      +33     
+ Misses        112      110       -2     
  Partials        2        2              
Impacted Files Coverage Δ
src/fetchers/stats-fetcher.js 94.46% <91.04%> (+1.34%) :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.

codecov[bot] avatar May 06 '23 15:05 codecov[bot]