mirror of
https://github.com/actions/labeler.git
synced 2025-12-10 11:41:56 +00:00
Add check for empty objects in checkAll
This commit is contained in:
4
dist/index.js
vendored
4
dist/index.js
vendored
@@ -467,7 +467,9 @@ exports.checkAny = checkAny;
|
||||
// equivalent to "Array.every()" but expanded for debugging and clarity
|
||||
function checkAll(matchConfigs, changedFiles) {
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user