3
0
Fork 0
mirror of https://github.com/tj-actions/changed-files synced 2025-01-29 13:34:51 +00:00

chore: move check out of loop

This commit is contained in:
Tonye Jack 2023-06-14 19:45:42 -06:00 committed by GitHub
parent 955946132d
commit 6cf9c8246e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -507,11 +507,10 @@ export const getFilteredChangedFiles = async ({
[ChangeTypeEnum.Unmerged]: [],
[ChangeTypeEnum.Unknown]: []
}
const hasFilePatterns = filePatterns.length > 0
for (const changeType of Object.keys(allDiffFiles)) {
const files = allDiffFiles[changeType as ChangeTypeEnum]
const hasFilePatterns = filePatterns.length > 0
if (hasFilePatterns) {
changedFiles[changeType as ChangeTypeEnum] = mm(files, filePatterns, {
dot: true,