๐Ÿ› fix find issue

This commit is contained in:
marocchino 2021-10-21 01:20:15 +09:00
parent a57b4690ec
commit 3c38ed8cd4
No known key found for this signature in database
GPG key ID: DEFF05E6B5B0FF97
5 changed files with 9 additions and 9 deletions

View file

@ -45,14 +45,13 @@ export async function findPreviousComment(
`,
{...repo, after, number}
)
core.warning(JSON.stringify(data))
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
const viewer = data.viewer as User
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
const repository = data.repository as Repository
const target = repository.pullRequest?.comments?.nodes?.find(
(node: IssueComment | null | undefined) =>
node?.author?.login === viewer.login &&
node?.author?.login === viewer.login.replace("[bot]", "") &&
!node?.isMinimized &&
node?.body?.includes(h)
)