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

request: total number of forks

Open AyushShahh opened this issue 3 years ago • 6 comments

I would like to have total number of forks in the stats.

AyushShahh avatar Aug 13 '21 13:08 AyushShahh

could I be assigned to this?

DIvkov575 avatar Oct 11 '22 03:10 DIvkov575

Feel free to create a PR 🚀. I assigned you to this issue. However, I can not promise that this will be merged into the master branch shortly since there are much more pressing PRs open. I am, however, happy to review it and attach the hacktoberfest-accepted label. The number of forks are found under the forkCount object of the GraphQL query:

query userInfo($login: String!) {
  user(login: $login) {
    name
    login
    contributionsCollection {
      totalCommitContributions
      restrictedContributionsCount
    }
    repositories(
      first: 100
      ownerAffiliations: OWNER
      orderBy: {direction: DESC, field: STARGAZERS}
    ) {
      nodes {
        name
        stargazers {
          totalCount
        }
        forkCount
      }
    }
  }
}

rickstaa avatar Oct 11 '22 12:10 rickstaa

@DIvkov575 Turns out this was already done in #289 but closed by the stale bot. Maybe it is a good idea to first check with @anuraghazra how he thinks this feature can be implemented without bloating the stats card (see https://github.com/anuraghazra/github-readme-stats/pull/289#issuecomment-668995938).

rickstaa avatar Oct 11 '22 12:10 rickstaa

is this issue resolved or need help please let me know

g-nitin-1 avatar Oct 20 '23 07:10 g-nitin-1

is this issue resolved or need help please let me know

Hi @g-nitin-1, appreciate your interest in contributing! Just a heads up, the feature you're looking into was previously tackled in https://github.com/anuraghazra/github-readme-stats/pull/289. It underwent review by @anuraghazra, but unfortunately, the author closed the pull request and removed the branch.

I've reestablished the branch at https://github.com/anuraghazra/github-readme-stats/tree/issue%23287, but be warned, that resolving conflicts might pose a challenge due to significant divergence 😅. If you're up for it, create a fresh pull request based on the proposed changes from the original one. Also, make sure to address any comments left by @anuraghazra. Cheers!

rickstaa avatar Oct 20 '23 09:10 rickstaa