mirror of
https://github.com/tj-actions/changed-files
synced 2025-01-30 19:30:19 +00:00
chore: move check out of loop
This commit is contained in:
parent
955946132d
commit
6cf9c8246e
1 changed files with 1 additions and 2 deletions
|
@ -507,11 +507,10 @@ export const getFilteredChangedFiles = async ({
|
||||||
[ChangeTypeEnum.Unmerged]: [],
|
[ChangeTypeEnum.Unmerged]: [],
|
||||||
[ChangeTypeEnum.Unknown]: []
|
[ChangeTypeEnum.Unknown]: []
|
||||||
}
|
}
|
||||||
|
const hasFilePatterns = filePatterns.length > 0
|
||||||
|
|
||||||
for (const changeType of Object.keys(allDiffFiles)) {
|
for (const changeType of Object.keys(allDiffFiles)) {
|
||||||
const files = allDiffFiles[changeType as ChangeTypeEnum]
|
const files = allDiffFiles[changeType as ChangeTypeEnum]
|
||||||
const hasFilePatterns = filePatterns.length > 0
|
|
||||||
|
|
||||||
if (hasFilePatterns) {
|
if (hasFilePatterns) {
|
||||||
changedFiles[changeType as ChangeTypeEnum] = mm(files, filePatterns, {
|
changedFiles[changeType as ChangeTypeEnum] = mm(files, filePatterns, {
|
||||||
dot: true,
|
dot: true,
|
||||||
|
|
Loading…
Reference in a new issue