fix: correct issue metrics and engagement trend calculations#92
Open
nehayadav827 wants to merge 1 commit into
Open
fix: correct issue metrics and engagement trend calculations#92nehayadav827 wants to merge 1 commit into
nehayadav827 wants to merge 1 commit into
Conversation
|
@nehayadav827 is attempting to deploy a commit to the SEETA's projects Team on Vercel. A member of the Team first needs to authorize it. |
Open
58 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes two data correctness issues in
src/lib/data-processing.tsrelated to BuilderOS analytics and engagement intelligence.Both bugs caused dashboard charts to display misleading values even when valid contributor data was available.
1. Fix incorrect closed issue detection in
processRawIssueMetrics()The previous implementation attempted to detect closed issues by checking whether GitHub issue URLs contained the word
"closed":GitHub issue URLs do not encode issue state, so this condition never worked reliably.
As a result:
closedIssueswas frequently incorrectFix
Closed issue detection now uses contributor-provided issue description fields and checks for natural completion indicators such as:
closedresolvedmerged2. Fix engagement trend aggregation in
calculateEngagementTrends()The previous implementation returned hardcoded zero values for:
High EngagementMedium EngagementLow Engagementeven when engagement data existed in the dataset.
Fix
The updated implementation now calculates engagement bands dynamically using the same
1 / 2 / 3participation prefix pattern already used elsewhere in the analytics pipeline.This ensures weekly engagement trend charts correctly reflect contributor participation levels.
Changes
src/lib/data-processing.tsValidation
A standalone local validation script was used during development to verify:
Validation output
Ran:
No formatting or whitespace issues were reported.
Additional Notes
Current repository checks still contain unrelated existing blockers:
npm run lintopens the interactive Next.js ESLint setup prompt because ESLint is not yet configured.npm test -- --runInBandstill contains a pre-existing unrelated mismatch insrc/lib/__tests__/utils.test.ts.No breaking changes introduced.
Checklist
Relates to #68