Skip to content

Commit 96c5cee

Browse files
Checking if any changes has been process
1 parent eda9489 commit 96c5cee

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

dist/index.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15245,9 +15245,13 @@ const runAction = async () => {
1524515245
modified.add(path);
1524615246
}
1524715247

15248-
console.log("Commit and push");
15249-
const paths = [...modified]
15250-
await commitAndPushSingleFile(accessToken, owner, repository, branch, paths, `Updated PR base on comments from code review by ${authorLogin}`);
15248+
if (modified.size === 0) {
15249+
console.log("No changes to push.");
15250+
} else {
15251+
console.log("Commit and push");
15252+
const paths = [...modified]
15253+
await commitAndPushSingleFile(accessToken, owner, repository, branch, paths, `Updated PR base on comments from code review by ${authorLogin}`);
15254+
}
1525115255
}
1525215256

1525315257

src/main.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,11 @@ export const runAction = async () => {
5050
modified.add(path);
5151
}
5252

53-
console.log("Commit and push");
54-
const paths = [...modified]
55-
await commitAndPushSingleFile(accessToken, owner, repository, branch, paths, `Updated PR base on comments from code review by ${authorLogin}`);
53+
if (modified.size === 0) {
54+
console.log("No changes to push.");
55+
} else {
56+
console.log("Commit and push");
57+
const paths = [...modified]
58+
await commitAndPushSingleFile(accessToken, owner, repository, branch, paths, `Updated PR base on comments from code review by ${authorLogin}`);
59+
}
5660
}

0 commit comments

Comments
 (0)