Skip to content

Commit

Permalink
feat: add support for returning true for any_{changed, modified, dele…
Browse files Browse the repository at this point in the history
…ted}` outputs when no patterns are specified
  • Loading branch information
jackton1 authored Mar 13, 2024
1 parent 15807c9 commit 1070174
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/changedFilesOutput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ export const setOutputsAndGetModifiedAndChangedFilesStatus = async ({

await setOutput({
key: getOutputKey('any_changed', outputPrefix),
value: allChangedFiles.paths.length > 0 && filePatterns.length > 0,
value: allChangedFiles.paths.length > 0,
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir,
json: inputs.json
Expand Down Expand Up @@ -336,7 +336,7 @@ export const setOutputsAndGetModifiedAndChangedFilesStatus = async ({

await setOutput({
key: getOutputKey('any_modified', outputPrefix),
value: allModifiedFiles.paths.length > 0 && filePatterns.length > 0,
value: allModifiedFiles.paths.length > 0,
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir,
json: inputs.json
Expand Down Expand Up @@ -442,7 +442,7 @@ export const setOutputsAndGetModifiedAndChangedFilesStatus = async ({

await setOutput({
key: getOutputKey('any_deleted', outputPrefix),
value: deletedFiles.paths.length > 0 && filePatterns.length > 0,
value: deletedFiles.paths.length > 0,
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir,
json: inputs.json
Expand Down Expand Up @@ -496,7 +496,7 @@ export const setOutputsAndGetModifiedAndChangedFilesStatus = async ({
})

return {
anyModified: allModifiedFiles.paths.length > 0 && filePatterns.length > 0,
anyChanged: allChangedFiles.paths.length > 0 && filePatterns.length > 0
anyModified: allModifiedFiles.paths.length > 0,
anyChanged: allChangedFiles.paths.length > 0
}
}

0 comments on commit 1070174

Please sign in to comment.