chore: fix detection of bot comments after migrating to graphql (#35626)
This commit is contained in:
parent
224667e9ff
commit
61fc320053
|
@ -65,6 +65,7 @@ class GHAMarkdownReporter extends MarkdownReporter {
|
||||||
id
|
id
|
||||||
body
|
body
|
||||||
author {
|
author {
|
||||||
|
__typename
|
||||||
login
|
login
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -73,8 +74,10 @@ class GHAMarkdownReporter extends MarkdownReporter {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`);
|
`);
|
||||||
const comments = data.repository.pullRequest?.comments.nodes?.filter(
|
const comments = data.repository.pullRequest?.comments.nodes?.filter(comment =>
|
||||||
comment => comment?.author?.login === 'github-actions[bot]' && comment.body?.includes(magicComment));
|
comment?.author?.__typename === 'Bot' &&
|
||||||
|
comment?.author?.login === 'github-actions' &&
|
||||||
|
comment.body?.includes(magicComment));
|
||||||
const prId = data.repository.pullRequest?.id;
|
const prId = data.repository.pullRequest?.id;
|
||||||
if (!comments?.length)
|
if (!comments?.length)
|
||||||
return prId;
|
return prId;
|
||||||
|
|
Loading…
Reference in New Issue