mirror of
https://github.com/actions/labeler.git
synced 2025-12-11 03:58:05 +00:00
Make sure that the changed files config values are an array
This commit is contained in:
10
dist/index.js
vendored
10
dist/index.js
vendored
@@ -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);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user