profile-summary-for-github icon indicating copy to clipboard operation
profile-summary-for-github copied to clipboard

Commits per language isn’t accurate for multiple-languages repos

Open bfontaine opened this issue 8 years ago • 4 comments

That’s probably more a limitation of the GitHub API itself.

I have a repo written in 25 different languages. CoffeeScript is the most used one, with 8.9% of the repo, but represents at most 10 commits or so out of 392. However, my profile shows 392 commits written in CoffeeScript.

I’m not that familiar with the GitHub API; do you think that’s something we could fix?

bfontaine avatar Dec 21 '17 10:12 bfontaine

Aha, that's a fun problem. There should be an API for getting the lang-percent per repo, could use that to weight things.

tipsy avatar Dec 21 '17 11:12 tipsy

Number of commits is meaningless metric anyway, because it's easily inflated. (for example by committing everything line by line or word by word, etc…)

magicgoose avatar Dec 21 '17 15:12 magicgoose

Number of commits is meaningless metric anyway, because it's easily inflated. (for example by committing everything line by line or word by word, etc…)

This whole project is meaningless in that sense, everything on GitHub can be easily manipulated.

tipsy avatar Dec 21 '17 15:12 tipsy

You can use this endpoint to get 'total bytes of code written in that language' and use that to weight things. /repos/:owner/:repo/languages https://developer.github.com/v3/repos/#list-languages

Mohamed3on avatar Dec 23 '17 10:12 Mohamed3on