anuraghazra / anuraghazra/github-readme-stats

The most used languages only count the oldest 100 projects

Offen
#1,177 0 Kommentare 4 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
bug lang-card
Vorherrschende Sprache
JavaScript
Sterne
79.8k
Forks
37.7k
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

**Describe the bug**

The most used languages count only count the oldest 100 projects sorted by time. The new projects are not counted

**Expected behavior**

The most used languages count should count all projects

**Screenshots / Live demo link (paste the github-readme-stats link as markdown image)**

I test it in https://docs.github.com/en/graphql/overview/explorer

The current graphql is like

```graphql
{
user(login: "tc-imba") {
repositories(ownerAffiliations: OWNER, isFork: false, first: 100) {
nodes {
name
languages(first: 10, orderBy: {field: SIZE, direction: DESC}) {
edges {
size
node {
color
name
}
}
}
}
}
}
}
```

github limit the `first` to be 100, but we can add a parameter `start` to use the pagination and traverse all pages.

For example, we can add edges { cursor } and get a list of cursors

```graphql
{
user(login: "tc-imba") {
repositories(ownerAffiliations: OWNER, isFork: false, first: 100) {
edges {
cursor
}
nodes {
name
languages(first: 10, orderBy: {field: SIZE, direction: DESC}) {
edges {
size
node {
color
name
}
}
}
}
}
}
}
```

It shows that the cursor of the last repo is `Y3Vyc29yOnYyOpHOCWwxJg==`, and then we can use `start: "Y3Vyc29yOnYyOpHOCWwxJg=="` to find the 101-200 repos, and so on

**Additional context**
I'll draft a PR for this later

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

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