infra: fix bot comments (#4367)
This commit is contained in:
parent
c47d165668
commit
eff8ea24af
10
.github/scripts/validate.js
vendored
10
.github/scripts/validate.js
vendored
@ -267,11 +267,15 @@ const hidePreviousComments = async ({github, context}) => {
|
||||
issue_number: context.payload.issue.number,
|
||||
});
|
||||
|
||||
const botComments = comments.data.filter(
|
||||
(comment) => comment.user.type === 'Bot',
|
||||
// Filter for bot comments that aren't already hidden
|
||||
const unhiddenBotComments = comments.data.filter(
|
||||
(comment) =>
|
||||
comment.user.type === 'Bot' &&
|
||||
!comment.body.includes('<details>') &&
|
||||
!comment.body.includes('Previous bot comment')
|
||||
);
|
||||
|
||||
for (const comment of botComments) {
|
||||
for (const comment of unhiddenBotComments) {
|
||||
// Don't format string - it will broke the markdown
|
||||
const hiddenBody = `
|
||||
<details>
|
||||
|
Loading…
Reference in New Issue
Block a user