Repository navigation
fix(analytics): normalize health score for missing contributor data - #365
rishiiicreates wants to merge 1 commit into
Conversation
Distinguish between un-fetched contributor data and a genuine count of zero contributors. When contributor data is un-fetched in No-PAT mode, renormalize Activity (40%) and Issue Health (30%) to 100%. When contributor data is fetched, retain existing weights including diversity penalties for zero contributors. Fixes AOSSIE-Org#361
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
WalkthroughThe health score calculation now distinguishes unavailable contributor data from a fetched count of zero. The analytical model passes this distinction to the calculation. Tests cover both cases. ChangesContributor Data Health Scoring
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Suggested labels: Suggested reviewers: Merge Risk: ⚪ Minimal · up to
|
Addressed Issues
Fixes #361
Additional Notes
distinguishes between un-fetched contributor data and a genuine count of zero contributors. in no-pat mode contributor data is fetched only for the top 10 repos, so other repos were falling back to an empty array and getting scored with 0 diversity, penalizing active repos by 30 points.
now if contributor data was never fetched for a repo, activity (40%) and issue health (30%) are renormalized to 100% so scores stay fair and comparable. if contributor data was fetched and actually has 0 contributors, the diversity penalty is preserved as expected.
verified with unit tests in healthMetrics.test.js and buildAnalyticalModel.test.js, and production build passes cleanly.
Summary by CodeRabbit