Skip to content

Commit 96bff99

Browse files
refactor: use multiplication instead of addition for bonus scoring
Co-authored-by: antonkovalenko <692649+antonkovalenko@users.noreply.github.com>
1 parent ccc2d70 commit 96bff99

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

.github/workflows/priority-score.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,20 +72,20 @@ jobs:
7272
const effectiveEffort = effort || defaultEffort;
7373
let baseScore = Math.round((effectiveReach * effectiveImpact) / effectiveEffort);
7474
75-
// Add bonus scores for special labels
76-
// "heart xeno" adds value equal to defaultImpact
77-
// "feedback" adds value equal to defaultReach
78-
let bonusScore = 0;
75+
// Apply bonus multipliers for special labels
76+
// "heart xeno" multiplies by defaultImpact
77+
// "feedback" multiplies by defaultReach
78+
let bonusMultiplier = 1;
7979
if (hasHeartXeno) {
80-
bonusScore += defaultImpact;
80+
bonusMultiplier *= defaultImpact;
8181
}
8282
if (hasFeedback) {
83-
bonusScore += defaultReach;
83+
bonusMultiplier *= defaultReach;
8484
}
8585
86-
let finalScore = baseScore + bonusScore;
86+
let finalScore = baseScore * bonusMultiplier;
8787
88-
console.log(`📊 Priority calculation: reach=${reach || 'default'}, impact=${impact || 'default'}, effort=${effort || 'default'}, heartXeno=${hasHeartXeno}, feedback=${hasFeedback} → baseScore=${baseScore}, bonus=${bonusScore}, finalScore=${finalScore}`);
88+
console.log(`📊 Priority calculation: reach=${reach || 'default'}, impact=${impact || 'default'}, effort=${effort || 'default'}, heartXeno=${hasHeartXeno}, feedback=${hasFeedback} → baseScore=${baseScore}, multiplier=${bonusMultiplier}, finalScore=${finalScore}`);
8989
9090
const projectNumber = 24;
9191
const org = "ydb-platform";

0 commit comments

Comments
 (0)