forked from espressif/esp-idf
ci(danger): Changed pattern for matching area labels
This commit is contained in:
@@ -5,10 +5,10 @@
|
|||||||
*/
|
*/
|
||||||
module.exports = async function () {
|
module.exports = async function () {
|
||||||
const projectId = 103; // ESP-IDF
|
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 projectLabels = await danger.gitlab.api.Labels.all(projectId); // Get all project labels
|
||||||
const areaLabels = projectLabels
|
const areaLabels = projectLabels
|
||||||
.filter((label) => label.color === areaLabelColor)
|
.filter((label) => areaLabelColor.test(label.color))
|
||||||
.map((label) => label.name); // Filter only area labels
|
.map((label) => label.name); // Filter only area labels
|
||||||
const mrLabels = danger.gitlab.mr.labels; // Get MR labels
|
const mrLabels = danger.gitlab.mr.labels; // Get MR labels
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user