Skip to content

Commit ccc2d70

Browse files
feat: add bonus scoring for "heart xeno" and "feedback" labels
Co-authored-by: antonkovalenko <692649+antonkovalenko@users.noreply.github.com>
1 parent 1b54f2e commit ccc2d70

File tree

1 file changed

+30
-10
lines changed

1 file changed

+30
-10
lines changed

.github/workflows/priority-score.yml

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ jobs:
4040
let reach = null;
4141
let impact = null;
4242
let effort = null;
43+
let hasHeartXeno = false;
44+
let hasFeedback = false;
4345
4446
for (const label of labels) {
4547
if (reachWeights[label] !== undefined) {
@@ -51,21 +53,39 @@ jobs:
5153
if (effortWeights[label] !== undefined) {
5254
effort = effortWeights[label];
5355
}
56+
if (label === "heart xeno") {
57+
hasHeartXeno = true;
58+
}
59+
if (label === "feedback") {
60+
hasFeedback = true;
61+
}
5462
}
5563
64+
// Fallback default values
65+
const defaultReach = 75; // default to medium reach
66+
const defaultImpact = 75; // default to low impact
67+
const defaultEffort = 4; // default to medium effort
68+
5669
// Calculate priority score using formula: (reach * impact) / effort
57-
let finalScore = 0;
58-
if (reach !== null && impact !== null && effort !== null) {
59-
finalScore = Math.round((reach * impact) / effort);
60-
} else {
61-
// Fallback to default values if labels are missing
62-
const defaultReach = reach || 75; // default to medium reach
63-
const defaultImpact = impact || 75; // default to low impact
64-
const defaultEffort = effort || 4; // default to medium effort
65-
finalScore = Math.round((defaultReach * defaultImpact) / defaultEffort);
70+
const effectiveReach = reach || defaultReach;
71+
const effectiveImpact = impact || defaultImpact;
72+
const effectiveEffort = effort || defaultEffort;
73+
let baseScore = Math.round((effectiveReach * effectiveImpact) / effectiveEffort);
74+
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;
79+
if (hasHeartXeno) {
80+
bonusScore += defaultImpact;
6681
}
82+
if (hasFeedback) {
83+
bonusScore += defaultReach;
84+
}
85+
86+
let finalScore = baseScore + bonusScore;
6787
68-
console.log(`📊 Priority calculation: reach=${reach || 'default'}, impact=${impact || 'default'}, effort=${effort || 'default'} → score=${finalScore}`);
88+
console.log(`📊 Priority calculation: reach=${reach || 'default'}, impact=${impact || 'default'}, effort=${effort || 'default'}, heartXeno=${hasHeartXeno}, feedback=${hasFeedback} → baseScore=${baseScore}, bonus=${bonusScore}, finalScore=${finalScore}`);
6989
7090
const projectNumber = 24;
7191
const org = "ydb-platform";

0 commit comments

Comments
 (0)