From 61fc32005302ab105ea777cae836673d40a8a0ab Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Tue, 15 Apr 2025 14:28:11 -0700 Subject: [PATCH] chore: fix detection of bot comments after migrating to graphql (#35626) --- packages/playwright-dashboard/src/ghaMarkdownReporter.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/playwright-dashboard/src/ghaMarkdownReporter.ts b/packages/playwright-dashboard/src/ghaMarkdownReporter.ts index 98dccd7ef6..f54767c65d 100644 --- a/packages/playwright-dashboard/src/ghaMarkdownReporter.ts +++ b/packages/playwright-dashboard/src/ghaMarkdownReporter.ts @@ -65,6 +65,7 @@ class GHAMarkdownReporter extends MarkdownReporter { id body author { + __typename login } } @@ -73,8 +74,10 @@ class GHAMarkdownReporter extends MarkdownReporter { } } `); - const comments = data.repository.pullRequest?.comments.nodes?.filter( - comment => comment?.author?.login === 'github-actions[bot]' && comment.body?.includes(magicComment)); + const comments = data.repository.pullRequest?.comments.nodes?.filter(comment => + comment?.author?.__typename === 'Bot' && + comment?.author?.login === 'github-actions' && + comment.body?.includes(magicComment)); const prId = data.repository.pullRequest?.id; if (!comments?.length) return prId;