diff --git a/dist/index.js b/dist/index.js index 6d27f191..50f07c2b 100644 Binary files a/dist/index.js and b/dist/index.js differ diff --git a/dist/index.js.map b/dist/index.js.map index 1385dd28..7ecde484 100644 Binary files a/dist/index.js.map and b/dist/index.js.map differ diff --git a/src/changedFiles.ts b/src/changedFiles.ts index 33c702b3..eb7b99f2 100644 --- a/src/changedFiles.ts +++ b/src/changedFiles.ts @@ -65,9 +65,11 @@ export const getRenamedFiles = async ({ diff })) ) { - core.warning( - `Set 'fetch_additional_submodule_history: true' to fetch additional submodule history for: ${submodulePath}, Note you can control the fetch depth using 'fetch_depth' input` - ) + let message = `Set 'fetch_additional_submodule_history: true' to fetch additional submodule history for: ${submodulePath}` + if (inputs.fetchSubmoduleHistory) { + message = `To fetch additional submodule history for: ${submodulePath} you can increase history depth using 'fetch_depth' input` + } + core.warning(message) diff = '..' } @@ -118,13 +120,15 @@ export const getAllDiffFiles = async ({ hasSubmodule, diffResult, submodulePaths, - outputRenamedFilesAsDeletedAndAdded + outputRenamedFilesAsDeletedAndAdded, + fetchSubmoduleHistory }: { workingDirectory: string hasSubmodule: boolean diffResult: DiffResult submodulePaths: string[] outputRenamedFilesAsDeletedAndAdded: boolean + fetchSubmoduleHistory: boolean }): Promise => { const files = await getAllChangedFiles({ cwd: workingDirectory, @@ -160,9 +164,11 @@ export const getAllDiffFiles = async ({ diff })) ) { - core.warning( - `Set 'fetch_additional_submodule_history: true' to fetch additional submodule history for: ${submodulePath}, Note you can control the fetch depth using 'fetch_depth' input` - ) + let message = `Set 'fetch_additional_submodule_history: true' to fetch additional submodule history for: ${submodulePath}` + if (fetchSubmoduleHistory) { + message = `To fetch additional submodule history for: ${submodulePath} you can increase history depth using 'fetch_depth' input` + } + core.warning(message) diff = '..' } diff --git a/src/inputs.ts b/src/inputs.ts index a92041db..d0a4b282 100644 --- a/src/inputs.ts +++ b/src/inputs.ts @@ -34,7 +34,7 @@ export type Inputs = { json: boolean escapeJson: boolean fetchDepth?: number - fetchSubmoduleHistory?: boolean + fetchSubmoduleHistory: boolean sinceLastRemoteCommit: boolean writeOutputFiles: boolean outputDir: string diff --git a/src/main.ts b/src/main.ts index 2f8024a6..cd0cc445 100644 --- a/src/main.ts +++ b/src/main.ts @@ -190,7 +190,8 @@ const getChangedFilesFromLocalGit = async ({ hasSubmodule, diffResult, submodulePaths, - outputRenamedFilesAsDeletedAndAdded + outputRenamedFilesAsDeletedAndAdded, + fetchSubmoduleHistory: inputs.fetchSubmoduleHistory }) core.debug(`All diff files: ${JSON.stringify(allDiffFiles)}`) core.info('All Done!') diff --git a/test/demo b/test/demo index 8bbc7261..e168fac8 160000 --- a/test/demo +++ b/test/demo @@ -1 +1 @@ -Subproject commit 8bbc72611c1e47c6aeb1f68247ca84f277473498 +Subproject commit e168fac86c58062a1054c3a5540cd81577c4e2ba