Skip to content

Commit

Permalink
Merge pull request #920 from Queen-codes/fix-skills-bug
Browse files Browse the repository at this point in the history
fixed skill not rendering properly on issue-finder
  • Loading branch information
TimidRobot authored Jan 30, 2025
2 parents 7345abf + 7863ab6 commit c55453a
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions webpack/js/issue-finder.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ document.addEventListener("DOMContentLoaded", function () {

function hydrateAppWithData(skills, labels) {
const categories = {};

// Process skills and categorize them
skills = Array.from(new Set(Object.values(skills).flat()));
skills.forEach((skill) => {
let name = `💪 skill: ${skill.toLowerCase()}`;
categories[name] = "skill";
});

labels.groups.forEach((group) => {
group.labels.forEach((label) => {
let name = label.name;
Expand All @@ -63,13 +71,19 @@ document.addEventListener("DOMContentLoaded", function () {
} else {
styleName = group.name;
}
categories[name] = styleName;
// Only assign if not already categorized
if (!categories[name]) {
categories[name] = styleName;
}
});
});

labels.standalone.forEach((label) => {
let name = `${label.emoji} ${label.name}`;
categories[name] = "miscellaneous";
// Only assign "miscellaneous" if it hasn't already been categorized
if (!categories[name]) {
categories[name] = "miscellaneous";
}
});

skills = Array.from(new Set(Object.values(skills).flat()));
Expand Down

0 comments on commit c55453a

Please sign in to comment.