Add warning for unnormalizable SVG icon names
This commit is contained in:
@@ -58,6 +58,9 @@ async function checkWorkflows(
|
|||||||
));
|
));
|
||||||
const iconName: string | undefined = workflowProperties["iconName"];
|
const iconName: string | undefined = workflowProperties["iconName"];
|
||||||
const normalizedSvgIconName = normalizeSvgIconName(iconName);
|
const normalizedSvgIconName = normalizeSvgIconName(iconName);
|
||||||
|
if (iconName && !normalizedSvgIconName) {
|
||||||
|
console.warn(`Warning: could not normalize icon "${iconName}" for workflow ${workflowId}, skipping icon sync`);
|
||||||
|
}
|
||||||
|
|
||||||
const isPartnerWorkflow = workflowProperties.creator ? partnersSet.has(workflowProperties.creator.toLowerCase()) : false;
|
const isPartnerWorkflow = workflowProperties.creator ? partnersSet.has(workflowProperties.creator.toLowerCase()) : false;
|
||||||
|
|
||||||
@@ -71,7 +74,7 @@ async function checkWorkflows(
|
|||||||
id: workflowId,
|
id: workflowId,
|
||||||
iconName: normalizedSvgIconName,
|
iconName: normalizedSvgIconName,
|
||||||
iconType:
|
iconType:
|
||||||
iconName && iconName.startsWith("octicon") ? "octicon" : "svg",
|
normalizedSvgIconName && normalizedSvgIconName.startsWith("octicon") ? "octicon" : "svg",
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!enabled) {
|
if (!enabled) {
|
||||||
@@ -190,7 +193,7 @@ async function checkWorkflow(
|
|||||||
r.push(join(x.folder, "properties", `${x.id}.properties.json`));
|
r.push(join(x.folder, "properties", `${x.id}.properties.json`));
|
||||||
};
|
};
|
||||||
|
|
||||||
if (x.iconType === "svg") {
|
if (x.iconType === "svg" && x.iconName) {
|
||||||
r.push(
|
r.push(
|
||||||
join(
|
join(
|
||||||
"../../icons",
|
"../../icons",
|
||||||
|
|||||||
Reference in New Issue
Block a user