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;
@@ -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;
}
}