Skip to content

Commit bccce81

Browse files
authored
chore: fix logic in file-diff github action (#3161)
1 parent 01c7a8b commit bccce81

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

.github/actions/file-diff/index.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,13 +138,9 @@ async function run() {
138138
*
139139
* Else: report that there is no change
140140
*/
141-
if (
142-
(existsSync(join(basePath, filePath, name)) && !existsSync(join(headPath, filePath, name)))
143-
) {
141+
if (isRemoved(headMainSize, baseMainSize)) {
144142
data.push("🚨 deleted, moved, or renamed");
145-
} else if (
146-
(existsSync(join(headPath, filePath, name)) && !existsSync(join(basePath, filePath, name)))
147-
) {
143+
} else if (isNew(headMainSize, baseMainSize)) {
148144
data.push("🎉 new");
149145
} else if (
150146
((Math.abs(difference(headMainSize, baseMainSize))) / 1000) >= 0.001

0 commit comments

Comments
 (0)