Update service-helpers.js

This commit is contained in:
shamoon
2025-10-12 21:30:41 -07:00
parent 9fb68953a5
commit d593467cc2

View File

@@ -254,6 +254,7 @@ export function cleanServiceGroups(groups) {
// all widgets
fields,
hideErrors,
highlight,
type,
// azuredevops
@@ -437,6 +438,21 @@ export function cleanServiceGroups(groups) {
index,
};
if (highlight) {
let parsedHighlight = highlight;
if (typeof highlight === "string") {
try {
parsedHighlight = JSON.parse(highlight);
} catch (e) {
logger.error("Invalid highlight configuration detected in config for service '%s'", service.name);
parsedHighlight = null;
}
}
if (parsedHighlight && typeof parsedHighlight === "object") {
widget.highlight = parsedHighlight;
}
}
if (type === "azuredevops") {
if (userEmail) widget.userEmail = userEmail;
if (repositoryId) widget.repositoryId = repositoryId;