Skip to content

Commit 0f0a6e8

Browse files
fix comments
1 parent 2ef12bc commit 0f0a6e8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/a11y-contrast.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff 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,

0 commit comments

Comments
 (0)