diff --git a/.gitlab/dangerjs/mrAreaLabels.js b/.gitlab/dangerjs/mrAreaLabels.js index 6ee5796879..6ee3148be7 100644 --- a/.gitlab/dangerjs/mrAreaLabels.js +++ b/.gitlab/dangerjs/mrAreaLabels.js @@ -5,10 +5,10 @@ */ module.exports = async function () { const projectId = 103; // ESP-IDF - const areaLabelColor = "#d2eBFA"; + const areaLabelColor = /^#d2ebfa$/i; // match color code (case-insensitive) const projectLabels = await danger.gitlab.api.Labels.all(projectId); // Get all project labels const areaLabels = projectLabels - .filter((label) => label.color === areaLabelColor) + .filter((label) => areaLabelColor.test(label.color)) .map((label) => label.name); // Filter only area labels const mrLabels = danger.gitlab.mr.labels; // Get MR labels