anuraghazra / anuraghazra/github-readme-stats

Stats and languages results incorrect due to graphql 100 records limit

Offen
#1,852 14 Kommentare 6 Reaktionen 1 zugewiesene Person Beansprucht von @MatteoPierro Auf GitHub ansehen
:star: top bug bug hacktoberfest hacktoberfest-accepted help wanted lang-card stats-card
Vorherrschende Sprache
JavaScript
Sterne
79.8k
Forks
37.7k
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

**Describe the bug**

The current language and stats card results are incorrect for users with more than 100 repositories (see https://docs.github.com/en/graphql/overview/resource-limitations). This is because we are currently only fetching the first 100 repositories of a user account.

https://github.com/anuraghazra/github-readme-stats/blob/a68abbb9b3a47ad73988f37fce274e882e86b7ad/src/fetchers/stats-fetcher.js#L47

https://github.com/anuraghazra/github-readme-stats/blob/a68abbb9b3a47ad73988f37fce274e882e86b7ad/src/fetchers/top-languages-fetcher.js#L17

Because of this not all languages and stars of a user are represented.

**Expected behaviour**

I think we can use pagination options (i.e. `cursor`, `after`, `endCursor` objects) to loop through all repositories of a user account (see https://stackoverflow.com/a/70039506/8135687). @anuraghazra Let me know what you think.

**TODOs**

- [ ] Allow fetching of multiple pages for the languages data. #2111.
- [x] Improve the stats card such that it fetches more pages when a user has more than 100 repositories with stars. #2100
- [x] Merge #2159 to make this available on private Vercel instances while giving us the control to disable it on the public instance because of rate-limiting problems.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.