From 47aa8c6995076aff2c810bbf1538306686e76543 Mon Sep 17 00:00:00 2001 From: Ana Maria Martinez Gomez Date: Tue, 21 Dec 2021 19:52:35 +0100 Subject: [PATCH] Add renamed modified files to modified Rename files have the status `renamed`, but they can be also be modified. In this case, they include a patch field with the change. Use this field and add renamed files that have been modified to `modified` and `added_modified`. --- dist/index.js | 4 ++++ src/main.ts | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/dist/index.js b/dist/index.js index 32a94da9..1eea3512 100644 --- a/dist/index.js +++ b/dist/index.js @@ -4617,6 +4617,10 @@ function run() { break; case 'renamed': renamed.push(filename); + if (file.patch) { // modified renamed files include a patch field + modified.push(filename); + addedModified.push(filename); + } break; default: core.setFailed(`One of your files includes an unsupported file status '${file.status}', expected 'added', 'modified', 'removed', or 'renamed'.`); diff --git a/src/main.ts b/src/main.ts index 51a4a97e..bb9a6a15 100644 --- a/src/main.ts +++ b/src/main.ts @@ -124,6 +124,11 @@ async function run(): Promise { break case 'renamed': renamed.push(filename) + if (file.patch) { + // modified renamed files include a patch field + modified.push(filename) + addedModified.push(filename) + } break default: core.setFailed(