Skip to content

Commit f30eaa6

Browse files
committed
use sha instead of runId to identify previous comment
1 parent dd2f08b commit f30eaa6

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

dist/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9601,7 +9601,7 @@ try {
96019601
issue_number: pullRequest.number,
96029602
});
96039603

9604-
const existingComment = comments.find((comment) => comment.user.login === 'github-actions[bot]' && comment.body.endsWith(_lib_constants_js__WEBPACK_IMPORTED_MODULE_3__/* .signiture */ .o) && comment.body.includes(`runId: ${_actions_github__WEBPACK_IMPORTED_MODULE_1__.context.runId}`));
9604+
const existingComment = comments.find((comment) => comment.user.login === 'github-actions[bot]' && comment.body.endsWith(_lib_constants_js__WEBPACK_IMPORTED_MODULE_3__/* .signiture */ .o) && comment.body.includes(`sha: ${_actions_github__WEBPACK_IMPORTED_MODULE_1__.context.sha}`));
96059605

96069606
if (existingComment) {
96079607

@@ -9620,7 +9620,7 @@ try {
96209620

96219621
- ${testId}
96229622

9623-
runId: ${_actions_github__WEBPACK_IMPORTED_MODULE_1__.context.runId}
9623+
sha: ${_actions_github__WEBPACK_IMPORTED_MODULE_1__.context.sha}
96249624
${_lib_constants_js__WEBPACK_IMPORTED_MODULE_3__/* .signiture */ .o}`;
96259625
await octokit.rest.issues.createComment({
96269626
owner: _actions_github__WEBPACK_IMPORTED_MODULE_1__.context.repo.owner,

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ try {
2020
issue_number: pullRequest.number,
2121
});
2222

23-
const existingComment = comments.find((comment) => comment.user.login === 'github-actions[bot]' && comment.body.endsWith(signiture) && comment.body.includes(`runId: ${context.runId}`));
23+
const existingComment = comments.find((comment) => comment.user.login === 'github-actions[bot]' && comment.body.endsWith(signiture) && comment.body.includes(`sha: ${context.sha}`));
2424

2525
if (existingComment) {
2626

@@ -39,7 +39,7 @@ try {
3939
4040
- ${testId}
4141
42-
runId: ${context.runId}
42+
sha: ${context.sha}
4343
${signiture}`;
4444
await octokit.rest.issues.createComment({
4545
owner: context.repo.owner,

pre-dist/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9634,7 +9634,7 @@ try {
96349634
});
96359635

96369636

9637-
const oldComments = comments.filter((comment) => comment.user.login === 'github-actions[bot]' && comment.body.endsWith(_lib_constants_js__WEBPACK_IMPORTED_MODULE_3__/* .signiture */ .o) && !comment.body.includes(`runId: ${_actions_github__WEBPACK_IMPORTED_MODULE_1__.context.runId}`));
9637+
const oldComments = comments.filter((comment) => comment.user.login === 'github-actions[bot]' && comment.body.endsWith(_lib_constants_js__WEBPACK_IMPORTED_MODULE_3__/* .signiture */ .o) && !comment.body.includes(`sha: ${_actions_github__WEBPACK_IMPORTED_MODULE_1__.context.sha}`));
96389638
if(oldComments.length){
96399639
const promises = oldComments.map(oldComment=>octokit.rest.issues.deleteComment({
96409640
owner: _actions_github__WEBPACK_IMPORTED_MODULE_1__.context.repo.owner,

pre.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ try {
1818
});
1919

2020

21-
const oldComments = comments.filter((comment) => comment.user.login === 'github-actions[bot]' && comment.body.endsWith(signiture) && !comment.body.includes(`runId: ${context.runId}`));
21+
const oldComments = comments.filter((comment) => comment.user.login === 'github-actions[bot]' && comment.body.endsWith(signiture) && !comment.body.includes(`sha: ${context.sha}`));
2222
if(oldComments.length){
2323
const promises = oldComments.map(oldComment=>octokit.rest.issues.deleteComment({
2424
owner: context.repo.owner,

0 commit comments

Comments
 (0)