From ef108a9d83abd35f862094cd56b166179b4da426 Mon Sep 17 00:00:00 2001 From: Josh Dales Date: Sat, 18 Mar 2023 15:42:20 -0400 Subject: [PATCH] Convert the yaml output to a matchConfig in getLabelConfigMapFromObject --- src/labeler.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/labeler.ts b/src/labeler.ts index 86927ec6..7d25d320 100644 --- a/src/labeler.ts +++ b/src/labeler.ts @@ -120,7 +120,8 @@ function getLabelConfigMapFromObject( ); } - labelMap.set(label, configOptions); + const matchConfigs = configOptions.map(toMatchConfig); + labelMap.set(label, matchConfigs); } return labelMap; @@ -141,9 +142,8 @@ export function checkMatchConfigs( matchConfigs: MatchConfig[] ): boolean { for (const config of matchConfigs) { - core.debug(` checking pattern ${JSON.stringify(config)}`); - const matchConfig = toMatchConfig(config); - if (!checkMatch(changedFiles, matchConfig)) { + core.debug(` checking config ${JSON.stringify(config)}`); + if (!checkMatch(changedFiles, config)) { return false; } }