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

Add option to include forks

Open spacey-sooty opened this issue 1 year ago • 6 comments

Is your feature request related to a problem? Please describe.

I program in group robotics a lot using C++ and would like the C++ to show up on my most used languages as it a language I use a lot.

Describe the solution you'd like

There should be an option to enable showing forks with your most used languages.

Describe alternatives you've considered

No response

Additional context

No response

spacey-sooty avatar Aug 20 '23 13:08 spacey-sooty

@spacey-sooty Thanks for your feature request! I think that having an ability to include forks data into top languages card would be great since a lot of programmers works mostly in someone others repositories. In this way, the top languages card would show more accurate data about the use of languages. I see that we already have a draft pull request https://github.com/anuraghazra/github-readme-stats/pull/2611 with implementation of this feature.

@rickstaa What do you think about these feature? If you are up to approve it i can find a time to reanimate this pull request.

qwerty541 avatar Aug 21 '23 02:08 qwerty541

Yeah I 100% agree with that assesment I do a huge amount of group programming work which means lots of my code is in forks and I believe a lot of other programmers share that experience. Having that pull request finished would be great it looks like it perfectly adresses what I need. Thank you for your help and support!

spacey-sooty avatar Aug 21 '23 07:08 spacey-sooty

@spacey-sooty Thanks for your feature request! I think that having an ability to include forks data into top languages card would be great since a lot of programmers works mostly in someone others repositories. In this way, the top languages card would show more accurate data about the use of languages. I see that we already have a draft pull request #2611 with implementation of this feature.

@rickstaa What do you think about these feature? If you are up to approve it i can find a time to reanimate this pull request.

@qwerty541 and @spacey-sooty At present, including forks in the language calculation is not feasible due to limitations in GraphQL. You can find more details in this discussion. Including forks and organization repositories would likely lead to less accurate language results.

To advocate for a resolution to these limitations, you can show your support by participating in the discussion on GitHub's Community Discussions platform at https://github.com/orgs/community/discussions/18230. Let's keep this issue open as a reference 👍🏻.

rickstaa avatar Sep 11 '23 20:09 rickstaa

@rickstaa thank you for explaining that I hope that some of those issues can be adressed by github!

spacey-sooty avatar Sep 12 '23 03:09 spacey-sooty

@spacey-sooty Thanks for your feature request! I think that having an ability to include forks data into top languages card would be great since a lot of programmers works mostly in someone others repositories. In this way, the top languages card would show more accurate data about the use of languages. I see that we already have a draft pull request #2611 with implementation of this feature. @rickstaa What do you think about these feature? If you are up to approve it i can find a time to reanimate this pull request.

@qwerty541 and @spacey-sooty At present, including forks in the language calculation is not feasible due to limitations in GraphQL. You can find more details in this discussion. Including forks and organization repositories would likely lead to less accurate language results.

To advocate for a resolution to these limitations, you can show your support by participating in the discussion on GitHub's Community Discussions platform at https://github.com/orgs/community/discussions/18230. Let's keep this issue open as a reference 👍🏻.

@rickstaa What do you think about releasing this feature under environment variable to not increase load on public instance by fetching additional repositories data. Users will be allowed to use that only on their own instances.

Also i disagree that including forks and organizations repositories would lead to less accurate language results. For example in my own case, i contribute a lot in github-readme-stats project and use Javascript language a lot, but my languages card shows only 6% usage of it because i mostly do not use Javascript in my own repositories. Is that behavior correct? I do not think so. Perhaps in each specific case the situation can be different and this is a reason why that feature should be opt-in.

qwerty541 avatar Sep 17 '23 15:09 qwerty541

@rickstaa What do you think about releasing this feature under environment variable to not increase load on public instance by fetching additional repositories data. Users will be allowed to use that only on their own instances.

@qwerty541, I'm in favour of incorporating it as an environment variable and making it accessible within the GitHub action. However, it's crucial to emphasize that when including forks and organizations, the accuracy of the language data might be compromised.

@rickstaa, what are your thoughts on introducing this feature through an environment variable? This approach would prevent additional strain on the public instance by avoiding the need to fetch data from additional repositories. Users would be granted the privilege to use this feature exclusively on their own instances.

It's essential to remember that we currently lack a mechanism to pinpoint the exact code contributions made by individuals within a repository or fork. When we include forks, it aggregates all languages used in that repository, encompassing code written by various contributors. Consequently, this exacerbates the inaccuracies in our language detection results, which are already a challenge.

For repositories under your ownership, there's a higher likelihood that you authored the code. Regrettably, at present, there's no effective method to exclusively tally a user's contributions (refer to https://github.com/orgs/community/discussions/18230).

rickstaa avatar Sep 17 '23 16:09 rickstaa