diff --git a/dist/index.js b/dist/index.js index c2c74d562..ef8dc9a1c 100644 --- a/dist/index.js +++ b/dist/index.js @@ -273,8 +273,14 @@ function toChangedFilesMatchConfig(config) { else { // If it is not an array of strings then it should be array of further config options // so assign them to our `changedFilesMatchConfig` - changedFilesConfig.forEach(element => { - Object.assign(changedFilesMatchConfig.changedFiles, element); + changedFilesConfig.forEach(config => { + // Make sure that the values that we assign to our match config are an array + Object.entries(config).forEach(([key, value]) => { + const element = { + [key]: Array.isArray(value) ? value : [value] + }; + Object.assign(changedFilesMatchConfig.changedFiles, element); + }); }); } } diff --git a/src/labeler.ts b/src/labeler.ts index 1510d1cde..9d20e65df 100644 --- a/src/labeler.ts +++ b/src/labeler.ts @@ -173,8 +173,14 @@ function toChangedFilesMatchConfig(config: any): ChangedFilesMatchConfig { } else { // If it is not an array of strings then it should be array of further config options // so assign them to our `changedFilesMatchConfig` - changedFilesConfig.forEach(element => { - Object.assign(changedFilesMatchConfig.changedFiles, element); + changedFilesConfig.forEach(config => { + // Make sure that the values that we assign to our match config are an array + Object.entries(config).forEach(([key, value]) => { + const element = { + [key]: Array.isArray(value) ? value : [value] + }; + Object.assign(changedFilesMatchConfig.changedFiles, element); + }); }); } }