diff --git a/server/lib/core/dispatch.ts b/server/lib/core/dispatch.ts index 56fa891..c719e29 100644 --- a/server/lib/core/dispatch.ts +++ b/server/lib/core/dispatch.ts @@ -172,10 +172,12 @@ export async function dispatchEvent( const showEmoji = group?.emoji !== false; const message = formatEvent(route, event, tr, showEmoji); if (event.event === "check_suite") { - const suite = event.payload.check_suite as { - conclusion?: string; - check_runs_url?: string; - } | undefined; + const suite = event.payload.check_suite as + | { + conclusion?: string; + check_runs_url?: string; + } + | undefined; if (suite?.conclusion === "failure" && suite.check_runs_url) { const buildLogUrl = await getCheckSuiteBuildLogUrl( suite.check_runs_url, diff --git a/server/lib/github/check-run.ts b/server/lib/github/check-run.ts index 5b858c2..37ffca0 100644 --- a/server/lib/github/check-run.ts +++ b/server/lib/github/check-run.ts @@ -22,14 +22,17 @@ export async function getCheckSuiteBuildLogUrl( if (!checkRunsUrl || !appId || !privateKey || !installationId) return undefined; try { const jwt = await createAppJwt(appId, privateKey); - const tokRes = await fetch(`https://api.github.com/app/installations/${installationId}/access_tokens`, { - method: "POST", - headers: { - Authorization: `Bearer ${jwt}`, - Accept: "application/vnd.github+json", - "X-GitHub-Api-Version": API_VERSION, + const tokRes = await fetch( + `https://api.github.com/app/installations/${installationId}/access_tokens`, + { + method: "POST", + headers: { + Authorization: `Bearer ${jwt}`, + Accept: "application/vnd.github+json", + "X-GitHub-Api-Version": API_VERSION, + }, }, - }); + ); if (!tokRes.ok) return undefined; const { token } = (await tokRes.json()) as { token?: string }; if (!token) return undefined;