File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -123,13 +123,13 @@ jobs:
123123 ]
124124
125125 // get comments of token issues
126- const currentComments = comments.filter(comment => possibleTitles.some(titleStart => comment.body.includes(titleStart)));
126+ let currentComments = comments.filter(comment => possibleTitles.some(titleStart => comment.body.includes(titleStart)));
127127
128128 for (const {title, body} of results) {
129129 // get token issue
130130 const titleStart = title.substring(0, title.indexOf(':') + 1);
131131 // remove from currentComments
132-
132+ currentComments = currentComments.filter(comment => !comment.body.includes(titleStart));
133133 //
134134 const tokenCheckComment = comments.filter(comment => comment.body.includes(titleStart));
135135 const outputBody = `${title}\n\n${body}\n\n<a href="${WORKFLOW_SUMMARY_URL}">→ Details</a>`
@@ -158,6 +158,7 @@ jobs:
158158 // if token issue exists, update it
159159 if(currentComments.length > 0) {
160160 await currentComments.map(comment => {
161+ console.log('deleting comment', comment.id, comment)
161162 github.rest.issues.deleteComment({
162163 comment_id: comment.id,
163164 owner: context.repo.owner,
You can’t perform that action at this time.
0 commit comments