chore: update warning message (#1497)
Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
parent
3034ed7851
commit
f6e73eb5b6
17
dist/index.js
generated
vendored
17
dist/index.js
generated
vendored
@ -82,7 +82,11 @@ const getRenamedFiles = ({ inputs, workingDirectory, hasSubmodule, diffResult, s
|
|||||||
sha2: submoduleShaResult.currentSha,
|
sha2: submoduleShaResult.currentSha,
|
||||||
diff
|
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 = '..';
|
diff = '..';
|
||||||
}
|
}
|
||||||
const submoduleRenamedFiles = yield (0, utils_1.gitRenamedFiles)({
|
const submoduleRenamedFiles = yield (0, utils_1.gitRenamedFiles)({
|
||||||
@ -121,7 +125,7 @@ var ChangeTypeEnum;
|
|||||||
ChangeTypeEnum["Unmerged"] = "U";
|
ChangeTypeEnum["Unmerged"] = "U";
|
||||||
ChangeTypeEnum["Unknown"] = "X";
|
ChangeTypeEnum["Unknown"] = "X";
|
||||||
})(ChangeTypeEnum || (exports.ChangeTypeEnum = ChangeTypeEnum = {}));
|
})(ChangeTypeEnum || (exports.ChangeTypeEnum = ChangeTypeEnum = {}));
|
||||||
const getAllDiffFiles = ({ workingDirectory, hasSubmodule, diffResult, submodulePaths, outputRenamedFilesAsDeletedAndAdded }) => __awaiter(void 0, void 0, void 0, function* () {
|
const getAllDiffFiles = ({ workingDirectory, hasSubmodule, diffResult, submodulePaths, outputRenamedFilesAsDeletedAndAdded, fetchSubmoduleHistory }) => __awaiter(void 0, void 0, void 0, function* () {
|
||||||
const files = yield (0, utils_1.getAllChangedFiles)({
|
const files = yield (0, utils_1.getAllChangedFiles)({
|
||||||
cwd: workingDirectory,
|
cwd: workingDirectory,
|
||||||
sha1: diffResult.previousSha,
|
sha1: diffResult.previousSha,
|
||||||
@ -147,7 +151,11 @@ const getAllDiffFiles = ({ workingDirectory, hasSubmodule, diffResult, submodule
|
|||||||
sha2: submoduleShaResult.currentSha,
|
sha2: submoduleShaResult.currentSha,
|
||||||
diff
|
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 = '..';
|
||||||
}
|
}
|
||||||
const submoduleFiles = yield (0, utils_1.getAllChangedFiles)({
|
const submoduleFiles = yield (0, utils_1.getAllChangedFiles)({
|
||||||
@ -1532,7 +1540,8 @@ const getChangedFilesFromLocalGit = ({ inputs, env, workingDirectory, filePatter
|
|||||||
hasSubmodule,
|
hasSubmodule,
|
||||||
diffResult,
|
diffResult,
|
||||||
submodulePaths,
|
submodulePaths,
|
||||||
outputRenamedFilesAsDeletedAndAdded
|
outputRenamedFilesAsDeletedAndAdded,
|
||||||
|
fetchSubmoduleHistory: inputs.fetchSubmoduleHistory
|
||||||
});
|
});
|
||||||
core.debug(`All diff files: ${JSON.stringify(allDiffFiles)}`);
|
core.debug(`All diff files: ${JSON.stringify(allDiffFiles)}`);
|
||||||
core.info('All Done!');
|
core.info('All Done!');
|
||||||
|
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@ -65,9 +65,11 @@ export const getRenamedFiles = async ({
|
|||||||
diff
|
diff
|
||||||
}))
|
}))
|
||||||
) {
|
) {
|
||||||
core.warning(
|
let message = `Set 'fetch_additional_submodule_history: true' to fetch additional submodule history for: ${submodulePath}`
|
||||||
`Set 'fetch_additional_submodule_history: true' to fetch additional submodule history for: ${submodulePath}, Note you can control the fetch depth using 'fetch_depth' input`
|
if (inputs.fetchSubmoduleHistory) {
|
||||||
)
|
message = `To fetch additional submodule history for: ${submodulePath} you can increase history depth using 'fetch_depth' input`
|
||||||
|
}
|
||||||
|
core.warning(message)
|
||||||
diff = '..'
|
diff = '..'
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -118,13 +120,15 @@ export const getAllDiffFiles = async ({
|
|||||||
hasSubmodule,
|
hasSubmodule,
|
||||||
diffResult,
|
diffResult,
|
||||||
submodulePaths,
|
submodulePaths,
|
||||||
outputRenamedFilesAsDeletedAndAdded
|
outputRenamedFilesAsDeletedAndAdded,
|
||||||
|
fetchSubmoduleHistory
|
||||||
}: {
|
}: {
|
||||||
workingDirectory: string
|
workingDirectory: string
|
||||||
hasSubmodule: boolean
|
hasSubmodule: boolean
|
||||||
diffResult: DiffResult
|
diffResult: DiffResult
|
||||||
submodulePaths: string[]
|
submodulePaths: string[]
|
||||||
outputRenamedFilesAsDeletedAndAdded: boolean
|
outputRenamedFilesAsDeletedAndAdded: boolean
|
||||||
|
fetchSubmoduleHistory: boolean
|
||||||
}): Promise<ChangedFiles> => {
|
}): Promise<ChangedFiles> => {
|
||||||
const files = await getAllChangedFiles({
|
const files = await getAllChangedFiles({
|
||||||
cwd: workingDirectory,
|
cwd: workingDirectory,
|
||||||
@ -160,9 +164,11 @@ export const getAllDiffFiles = async ({
|
|||||||
diff
|
diff
|
||||||
}))
|
}))
|
||||||
) {
|
) {
|
||||||
core.warning(
|
let message = `Set 'fetch_additional_submodule_history: true' to fetch additional submodule history for: ${submodulePath}`
|
||||||
`Set 'fetch_additional_submodule_history: true' to fetch additional submodule history for: ${submodulePath}, Note you can control the fetch depth using 'fetch_depth' input`
|
if (fetchSubmoduleHistory) {
|
||||||
)
|
message = `To fetch additional submodule history for: ${submodulePath} you can increase history depth using 'fetch_depth' input`
|
||||||
|
}
|
||||||
|
core.warning(message)
|
||||||
diff = '..'
|
diff = '..'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ export type Inputs = {
|
|||||||
json: boolean
|
json: boolean
|
||||||
escapeJson: boolean
|
escapeJson: boolean
|
||||||
fetchDepth?: number
|
fetchDepth?: number
|
||||||
fetchSubmoduleHistory?: boolean
|
fetchSubmoduleHistory: boolean
|
||||||
sinceLastRemoteCommit: boolean
|
sinceLastRemoteCommit: boolean
|
||||||
writeOutputFiles: boolean
|
writeOutputFiles: boolean
|
||||||
outputDir: string
|
outputDir: string
|
||||||
|
@ -190,7 +190,8 @@ const getChangedFilesFromLocalGit = async ({
|
|||||||
hasSubmodule,
|
hasSubmodule,
|
||||||
diffResult,
|
diffResult,
|
||||||
submodulePaths,
|
submodulePaths,
|
||||||
outputRenamedFilesAsDeletedAndAdded
|
outputRenamedFilesAsDeletedAndAdded,
|
||||||
|
fetchSubmoduleHistory: inputs.fetchSubmoduleHistory
|
||||||
})
|
})
|
||||||
core.debug(`All diff files: ${JSON.stringify(allDiffFiles)}`)
|
core.debug(`All diff files: ${JSON.stringify(allDiffFiles)}`)
|
||||||
core.info('All Done!')
|
core.info('All Done!')
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 8bbc72611c1e47c6aeb1f68247ca84f277473498
|
Subproject commit e168fac86c58062a1054c3a5540cd81577c4e2ba
|
Loading…
x
Reference in New Issue
Block a user