mirror of
https://github.com/actions/labeler.git
synced 2025-12-12 12:37:48 +00:00
Convert the yaml output to a matchConfig in getLabelConfigMapFromObject
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user