anuraghazra / github-readme-stats

:zap: Dynamically generated stats for your github readmes
https://github-readme-stats.vercel.app
MIT License
69.53k stars 23.03k forks source link

Language detection show languages that I've never used #450

Open jcubic opened 4 years ago

jcubic commented 4 years ago

Describe the bug

I think that the app detect repos that not necessary is representational, that's why it show Lua and C for my username.

Expected behavior I expect to have different language stat, I've done almost none Lua and C.

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

I've never written any line of Lua code in my life, maybe I have fork with langauge in it.

I expect to have JavaScript, CSS, Scheme, PHP languages maybe TypeScript.

Additional context

Maybe the app should sort repos by stars so it show most faved repos which in turn will give most worked on repos.

Here is GraphQL query that show more relevant repositories (at least for me, tested in GraphQL explorer):

query {
      user(login: "jcubic") {
        # fetch only owner repos & not forks
        repositories(ownerAffiliations: OWNER, isFork: false, first: 100, orderBy:{field: STARGAZERS, direction: DESC}) {
          nodes {
            languages(first: 10, orderBy: {field: SIZE, direction: DESC}) {
              edges {
                size
                node {
                  color
                  name
                }
              }
            }
          }
        }
      }
}

Right now it show my first repo. Maybe they show up at random, that would be worst case.

Just FYI lua came from ToME game, repo that I've just copied from internet so it don't get lost, it was hard to find, I've not written even one line of it. Maybe you should also count number of commits in repo. ToME have exactly 3 commits.

jcubic commented 4 years ago

I've submitted an issue to GitHub community about adding orderBy COMMITS and COMMITS_BY_OWNER and fields as array: https://github.community/t/graphql-sort-by-array-and-sort-by-commits-count/131713 This will allow to give even better results if it will be implemented.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

jcubic commented 3 years ago

Awesome no comments whatsoever.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Potherca commented 3 years ago

@jcubic I would kindly suggest you either edit or delete your previous comment... It does contribute anything to your voice being heard, but it will more than likely put people off listening.

jcubic commented 3 years ago

This is really great, bot closed the issue, no one even bothered to reply, and after I've wrote about It, I've was asked to delete the comment. Very Nice.

Potherca commented 3 years ago

This is really great, bot closed the issue,

Yes. Apparently, there isn't much interest in this issue.

no one even bothered to reply

Why do you feel anyone would? This is a single developer's hobby project. It has almost 500 issues (both open and closed) and almost as many PRs. Are you really so surprised that, dispite all their hard work and effort @anuraghazra can not find time to answer every single issue and comment?

after I've wrote about It

What you write is closer to insult than you probably realise. I am trying to champion your cause (over in #481) but you writing here does not contribute to furthering that cause.

I've was asked to delete the comment

Not asked, suggested. Again, your tone and content are not doing yourself any favours...

Very Nice.

So is your complaining, self-served whining, entitlement, and rudeness.

You are using a service, provided to you at no cost without any warranties. You are free to stop using it if it disappoints you so. Or, swallow your pride, add some compassion to your tone, and make a real effort to collaborate and try to move this repo forward.

jcubic commented 3 years ago

I helping the project, by reporting issues I even added solution how to make project better. This is contributing to the project. And having bot that close the issue automatically, is rude. This conversation look like this:

Me: I've found a bug here is how to make project better. Bot: f*ck off.

And I'm commenting about this, I'm being rude. Making bot closing your issue where I'm trying to help is also close to insult, you probably don't realize this.

anuraghazra commented 3 years ago

Hi @jcubic sorry bot closed the issue.

Thanks opening the issue yes the top language detection isn't totally accurate right now and there are some ways we can make it better which we are discussing in #481

And in your case it shows lua,c because your ToME repo has lot of lua & c code in it.

Maybe you should also count number of commits in repo

Counting commits isn't a good option since that single commit can have multiple language code in it.

Our current approach only counts based on how much code in bytes you have in your repo and we sort that by SIZE

https://github.com/anuraghazra/github-readme-stats/blob/15afa65889047821edf9064559e9ace0b7815f70/src/fetchers/top-languages-fetcher.js#L15-L23

anuraghazra commented 3 years ago

@Potherca thanks understanding :)

It has almost 500 issues (both open and closed) and almost as many PRs. Are you really so surprised that, dispite all their hard work and effort @anuraghazra can not find time to answer every single issue and comment?

Yes this is true, I don't get much time nowdays. It's very hard to manage all these issues/prs single handedly when you have a fulltime job.

On weekends i mostly do triaging on this repo and spent time with my family and friends so that's why some issues get delayed responses. (and some I even totally miss out, just like this one)

And if stalebot closes any Issues or PR which i think is worth reopening i do reopen them too. :)

jcubic commented 3 years ago

@anuraghazra I think that the problem is

repositories(ownerAffiliations: OWNER, isFork: false, first: 100) {`

it seems that right now there is only one option sort by stargazers that I've requested when GraphQL was in beta, before GitHub got owned by Microsoft. I've created an issue for GitHub to add something that would be better for your project, but no one ever reply. My request was about using array as sort so you can better target best repos. Maybe if there was more people that need this it will be implemented. I'm not sure if that support forum still exist, I can't find my report in Google. Maybe that support forum was deleted.

anuraghazra commented 3 years ago

Yes only viable option right now is to use STARGAZER to filter the repos. but still not a perfect solution since if repo don't have any stargazers then it's pretty useless.

jcubic commented 3 years ago

Unfortunately I have no idea how right now add feature request to GitHub. This is something they would be able to implement. Maybe COMMITCOUNT, AUTHORCOMMITCOUNT or something like this.

anuraghazra commented 3 years ago

Unfortunately I have no idea how right now add feature request to GitHub. This is something they would be able to implement. Maybe COMMITCOUNT, AUTHORCOMMITCOUNT or something like this.

It can only be done via github forum and will only be implemented if there is demand for it.

jcubic commented 3 years ago

Ah that's right it was forum, found my original post https://github.community/t/graphql-sort-by-array-and-sort-by-commits-count/131713 maybe I've added wrong topic because no one replied.

STARGAZERS was implemented because I've added post that It would be nice to have this, I didn't use this yet (didn't implemented my application that I've planed to create), I'm not sure if anyone is using it. But if nice addition and it's documented so maybe people use it.