Add check for empty objects in checkAll

This commit is contained in:
Josh Dales
2023-05-15 10:45:56 -04:00
parent a5bed11d4d
commit a256a58edf
3 changed files with 12 additions and 3 deletions

View File

@@ -260,7 +260,13 @@ export function checkAll(
changedFiles: string[]
): boolean {
core.debug(` checking "all" patterns`);
if (!matchConfigs.length) {
if (
!matchConfigs.length ||
// Make sure that all the configs have keys that we can check for
!matchConfigs.some(configOption =>
ALLOWED_CONFIG_KEYS.includes(Object.keys(configOption)[0])
)
) {
core.debug(` no "all" patterns to check`);
return false;
}