diff --git a/src/utils/config/service-helpers.js b/src/utils/config/service-helpers.js index 9cdff1da0..5fadfdbb6 100644 --- a/src/utils/config/service-helpers.js +++ b/src/utils/config/service-helpers.js @@ -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;