@@ -111,25 +111,25 @@ jobs:
111
111
});
112
112
113
113
const possibleTitles = [
114
- '❌ light:',
115
- '❌ light_high_contrast:',
116
- '❌ light_colorblind:',
117
- '❌ light_tritanopia:',
118
- '❌ dark:',
119
- '❌ dark_dimmed:',
120
- '❌ dark_high_contrast:',
121
- '❌ dark_colorblind:',
122
- '❌ dark_tritanopia:'
114
+ '❌ ` light` :',
115
+ '❌ ` light_high_contrast` :',
116
+ '❌ ` light_colorblind` :',
117
+ '❌ ` light_tritanopia` :',
118
+ '❌ ` dark` :',
119
+ '❌ ` dark_dimmed` :',
120
+ '❌ ` dark_high_contrast` :',
121
+ '❌ ` dark_colorblind` :',
122
+ '❌ ` dark_tritanopia` :'
123
123
]
124
124
125
125
// 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)));
127
127
128
128
for (const {title, body} of results) {
129
129
// get token issue
130
130
const titleStart = title.substring(0, title.indexOf(':') + 1);
131
131
// remove from currentComments
132
-
132
+ currentComments = currentComments.filter(comment => !comment.body.includes(titleStart));
133
133
//
134
134
const tokenCheckComment = comments.filter(comment => comment.body.includes(titleStart));
135
135
const outputBody = `${title}\n\n${body}\n\n<a href="${WORKFLOW_SUMMARY_URL}">→ Details</a>`
@@ -158,6 +158,7 @@ jobs:
158
158
// if token issue exists, update it
159
159
if(currentComments.length > 0) {
160
160
await currentComments.map(comment => {
161
+ console.log('deleting comment', comment.id, comment)
161
162
github.rest.issues.deleteComment({
162
163
comment_id: comment.id,
163
164
owner: context.repo.owner,
@@ -195,15 +196,15 @@ jobs:
195
196
});
196
197
197
198
const possibleTitles = [
198
- '❌ light:',
199
- '❌ light_high_contrast:',
200
- '❌ light_colorblind:',
201
- '❌ light_tritanopia:',
202
- '❌ dark:',
203
- '❌ dark_dimmed:',
204
- '❌ dark_high_contrast:',
205
- '❌ dark_colorblind:',
206
- '❌ dark_tritanopia:'
199
+ '❌ ` light` :',
200
+ '❌ ` light_high_contrast` :',
201
+ '❌ ` light_colorblind` :',
202
+ '❌ ` light_tritanopia` :',
203
+ '❌ ` dark` :',
204
+ '❌ ` dark_dimmed` :',
205
+ '❌ ` dark_high_contrast` :',
206
+ '❌ ` dark_colorblind` :',
207
+ '❌ ` dark_tritanopia` :'
207
208
]
208
209
209
210
// get token issue
0 commit comments