Skip to content

Commit f38906a

Browse files
committed
fix: blocklist specificity
1 parent 99ff47c commit f38906a

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

src/scripts/crowdin/leaderboard/utils.ts

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -141,15 +141,19 @@ export const parseData = (json: TranslationCostReport): CostLeaderboardData[] =>
141141
})
142142
.filter(({ username, fullName }) => {
143143
// TODO: Remove specific user checks once Acolad has updated their usernames
144+
const lUser = username.toLowerCase()
145+
const lFull = (username + fullName).toLowerCase()
144146
const isBlocked =
145-
username === "ethdotorg" ||
146-
username.includes("LQS_") ||
147-
username.includes("REMOVED_USER") ||
148-
(username + fullName).includes("Aco_") ||
149-
(username + fullName).includes("Acc_") ||
150-
username === "Finnish_Sandberg" ||
151-
username === "Norwegian_Sandberg" ||
152-
username === "Swedish_Sandberg"
147+
lUser.includes("lqs_") ||
148+
lUser.includes("removed_user") ||
149+
lFull.includes("aco_") ||
150+
lFull.includes("acc_") ||
151+
[
152+
"ethdotorg",
153+
"finnish_sandberg",
154+
"norwegian_sandberg",
155+
"swedish_sandberg",
156+
].includes(lUser)
153157
return !isBlocked
154158
})
155159

0 commit comments

Comments
 (0)