Skip to content

Commit

Permalink
fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasoppermann committed Oct 8, 2024
1 parent 2ef12bc commit 0f0a6e8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/a11y-contrast.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,13 @@ jobs:
]
// get comments of token issues
const currentComments = comments.filter(comment => possibleTitles.some(titleStart => comment.body.includes(titleStart)));
let currentComments = comments.filter(comment => possibleTitles.some(titleStart => comment.body.includes(titleStart)));
for (const {title, body} of results) {
// get token issue
const titleStart = title.substring(0, title.indexOf(':') + 1);
// remove from currentComments
currentComments = currentComments.filter(comment => !comment.body.includes(titleStart));
//
const tokenCheckComment = comments.filter(comment => comment.body.includes(titleStart));
const outputBody = `${title}\n\n${body}\n\n<a href="${WORKFLOW_SUMMARY_URL}">→ Details</a>`
Expand Down Expand Up @@ -158,6 +158,7 @@ jobs:
// if token issue exists, update it
if(currentComments.length > 0) {
await currentComments.map(comment => {
console.log('deleting comment', comment.id, comment)
github.rest.issues.deleteComment({
comment_id: comment.id,
owner: context.repo.owner,
Expand Down

0 comments on commit 0f0a6e8

Please sign in to comment.