From a081a73d9bd8be08bd5c7b1b9c2691b834c3ab62 Mon Sep 17 00:00:00 2001 From: Jean Dessane Date: Tue, 26 Dec 2023 18:20:09 +0100 Subject: [PATCH] iterate --- dist/index.js | 2 +- src/main.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/index.js b/dist/index.js index f27a081..6d1a2fb 100644 --- a/dist/index.js +++ b/dist/index.js @@ -28962,7 +28962,7 @@ async function run() { issue_number: pr.number }); const linearComment = comments.data.find(c => { - console.log(`Comment by ${c.performed_via_github_app ?? c.user?.name}`); + console.log(`Comment by ${c.performed_via_github_app?.name ?? c.user?.name}`); return c.performed_via_github_app?.name === 'linear'; }); console.log(JSON.stringify(linearComment?.body)); diff --git a/src/main.ts b/src/main.ts index 487da1b..f66546d 100644 --- a/src/main.ts +++ b/src/main.ts @@ -17,7 +17,7 @@ export async function run(): Promise { ...github.context.repo, base: latestRelease.data.target_commitish, head: mainBranch, - state: 'closed' + state: 'closed', }) console.log(`${pullRequests.data.length} found`) @@ -31,7 +31,7 @@ export async function run(): Promise { }) const linearComment = comments.data.find(c => { console.log( - `Comment by ${c.performed_via_github_app ?? c.user?.name}` + `Comment by ${c.performed_via_github_app?.name ?? c.user?.name}` ) return c.performed_via_github_app?.name === 'linear' })