-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix language stat calculation #11692
Conversation
Okay, after going through some tests and discovering some weird behaviors whereas GitHub does not recalculate old repos I make these changes:
I've tested it on mirror repo from GH and the stats are 1:1 identical in database with what GH shows via API. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM if the mentioned behavior is intended.
* Fix language stat calculation * Group languages and ignore 0 size files * remove unneeded code
#11690) * Change language statistics to save size instead of percentage (#11681) * Change language statistics to save size instead of percentage in database Co-Authored-By: Cirno the Strongest <[email protected]> * Do not exclude if only language * Fix edge cases with special langauges Co-authored-by: Cirno the Strongest <[email protected]> * Fix language stat calculation (#11692) * Fix language stat calculation * Group languages and ignore 0 size files * remove unneeded code Co-authored-by: Cirno the Strongest <[email protected]>
* Fix language stat calculation * Group languages and ignore 0 size files * remove unneeded code
As discussed on Discord; #11681 broke primary language selection by storing excluded languages in database along with explicit "other".
This PR makes it so that "other" and excluded languages are not stored in database allowing us to replicate languages API the same way GitHub does.