Convert the yaml output to a matchConfig in getLabelConfigMapFromObject

This commit is contained in:
Josh Dales
2023-03-18 15:42:20 -04:00
parent 1ce9b356f6
commit ef108a9d83

View File

@@ -120,7 +120,8 @@ function getLabelConfigMapFromObject(
); );
} }
labelMap.set(label, configOptions); const matchConfigs = configOptions.map(toMatchConfig);
labelMap.set(label, matchConfigs);
} }
return labelMap; return labelMap;
@@ -141,9 +142,8 @@ export function checkMatchConfigs(
matchConfigs: MatchConfig[] matchConfigs: MatchConfig[]
): boolean { ): boolean {
for (const config of matchConfigs) { for (const config of matchConfigs) {
core.debug(` checking pattern ${JSON.stringify(config)}`); core.debug(` checking config ${JSON.stringify(config)}`);
const matchConfig = toMatchConfig(config); if (!checkMatch(changedFiles, config)) {
if (!checkMatch(changedFiles, matchConfig)) {
return false; return false;
} }
} }