fix: bug with returning old filename in renamed files output (#1281)
Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
parent
6d89069134
commit
54479c37f5
14
.github/workflows/test.yml
vendored
14
.github/workflows/test.yml
vendored
@ -1048,6 +1048,13 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
shell:
|
shell:
|
||||||
bash
|
bash
|
||||||
|
- name: Check the renamed_files output
|
||||||
|
if: "!contains(steps.changed-files-all-old-new-renamed-files-1.outputs.renamed_files, 'test/test rename-1.txt')"
|
||||||
|
run: |
|
||||||
|
echo "Invalid output: Expected to include (test/test rename-1.txt) got (${{ steps.changed-files-all-old-new-renamed-files-1.outputs.renamed_files }})"
|
||||||
|
exit 1
|
||||||
|
shell:
|
||||||
|
bash
|
||||||
- name: Run changed-files for old new filenames test rename 2
|
- name: Run changed-files for old new filenames test rename 2
|
||||||
id: changed-files-all-old-new-renamed-files-2
|
id: changed-files-all-old-new-renamed-files-2
|
||||||
uses: ./
|
uses: ./
|
||||||
@ -1068,6 +1075,13 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
shell:
|
shell:
|
||||||
bash
|
bash
|
||||||
|
- name: Check the renamed_files output
|
||||||
|
if: "!contains(steps.changed-files-all-old-new-renamed-files-2.outputs.renamed_files, 'test/test rename-2.txt')"
|
||||||
|
run: |
|
||||||
|
echo "Invalid output: Expected to include (test/test rename-2.txt) got (${{ steps.changed-files-all-old-new-renamed-files-2.outputs.renamed_files }})"
|
||||||
|
exit 1
|
||||||
|
shell:
|
||||||
|
bash
|
||||||
- name: Run changed-files for old new filenames test rename 2 output as deleted and added
|
- name: Run changed-files for old new filenames test rename 2 output as deleted and added
|
||||||
id: changed-files-all-old-new-renamed-files-2-output-as-deleted-and-added
|
id: changed-files-all-old-new-renamed-files-2-output-as-deleted-and-added
|
||||||
uses: ./
|
uses: ./
|
||||||
|
2
dist/index.js
generated
vendored
2
dist/index.js
generated
vendored
@ -1813,7 +1813,7 @@ const getAllChangedFiles = ({ cwd, sha1, sha2, diff, isSubmodule = false, parent
|
|||||||
changedFiles[changedFiles_1.ChangeTypeEnum.Added].push(normalizedNewPath);
|
changedFiles[changedFiles_1.ChangeTypeEnum.Added].push(normalizedNewPath);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
changedFiles[changedFiles_1.ChangeTypeEnum.Renamed].push(normalizedFilePath);
|
changedFiles[changedFiles_1.ChangeTypeEnum.Renamed].push(normalizedNewPath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
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
@ -484,7 +484,7 @@ export const getAllChangedFiles = async ({
|
|||||||
changedFiles[ChangeTypeEnum.Deleted].push(normalizedFilePath)
|
changedFiles[ChangeTypeEnum.Deleted].push(normalizedFilePath)
|
||||||
changedFiles[ChangeTypeEnum.Added].push(normalizedNewPath)
|
changedFiles[ChangeTypeEnum.Added].push(normalizedNewPath)
|
||||||
} else {
|
} else {
|
||||||
changedFiles[ChangeTypeEnum.Renamed].push(normalizedFilePath)
|
changedFiles[ChangeTypeEnum.Renamed].push(normalizedNewPath)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
changedFiles[changeType as ChangeTypeEnum].push(normalizedFilePath)
|
changedFiles[changeType as ChangeTypeEnum].push(normalizedFilePath)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user