File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -241,10 +241,19 @@ jobs:
241241 owner: context.repo.owner,
242242 repo: 'core'
243243 })
244+
245+ const triggerComments = comments.filter(comment =>
246+ comment.body.includes('/ecosystem-ci run')
247+ )
248+ // note: issue comments are ordered by ascending ID.
249+ // delete the previous ecosystem-ci trigger comments
250+ // just keep the latest one
251+ triggerComments.pop()
252+
244253 const workflowComments = comments.filter(comment =>
245254 comment.body.includes('Ran ecosystem CI:') || comment.body.includes('Triggered ecosystem CI:')
246255 )
247- for (const comment of workflowComments) {
256+ for (const comment of [... workflowComments, ...triggerComments] ) {
248257 await github.rest.issues.deleteComment({
249258 owner: context.repo.owner,
250259 repo: 'core',
You can’t perform that action at this time.
0 commit comments