Frontmatter
| id | 9327 |
| title | Fix commitRatio calculation to exclude private contributions |
| state | Closed |
| labels | bugai |
| assignees | tobiu |
| createdAt | Feb 27, 2026, 11:21 AM |
| updatedAt | Feb 27, 2026, 11:42 AM |
| githubUrl | https://github.com/neomjs/neo/issues/9327 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Feb 27, 2026, 11:42 AM |
Fix commitRatio calculation to exclude private contributions
tobiu assigned to @tobiu on Feb 27, 2026, 11:42 AM

tobiu
Feb 27, 2026, 11:42 AM
Input from Gemini 3.1 Pro:
✦ I have refactored the
Contributormodel to use the newdependsframework config. This allowed me to drastically simplify the calculated fields and securely fix thecommitRatiobug by dividingtotalCommitsstrictly bytotalPublicContributions. The changes have been committed and pushed todev.
tobiu closed this issue on Feb 27, 2026, 11:42 AM
A severe logic flaw was discovered in the calculation of
commitRatiowithin theContributormodel.Currently, the ratio is calculated as
totalCommits / totalContributions. However, thetotalCommitsdata we get from the GitHub API only represents public commits, whereastotalContributionsincludes private contributions.Because GitHub's API does not provide a breakdown of private contributions (we don't know if a private contribution is a commit, issue, or PR review), treating them as "non-commits" in the denominator artificially tanks the
commitRatiofor users with high private activity.For example, user
happy-sparkhas over 1M total contributions (99.96% private), but theircommitRatiodisplays as0.04%.The Fix: The
commitRatiomust be calculated strictly against public behavior:totalCommits / totalPublicContributions.