From 33ea6409a6b2ee0f50f784c1760c48a230338cfe Mon Sep 17 00:00:00 2001 From: Brace Sproul Date: Mon, 4 Aug 2025 17:13:08 -0700 Subject: [PATCH] fix: try unescaping newlines? idk (#667) --- packages/shared/src/github/auth.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/shared/src/github/auth.ts b/packages/shared/src/github/auth.ts index 6c90812e..97be1ddb 100644 --- a/packages/shared/src/github/auth.ts +++ b/packages/shared/src/github/auth.ts @@ -1,7 +1,7 @@ import { generateJWT } from "../jwt.js"; -const replaceNewlinesWithBackslashN = (str: string) => - str.replace(/\n/g, "\\n"); +const convertEscapedNewlinesToNewlines = (str: string) => + str.replace(/\\n/g, "\n"); /** * Gets an installation access token for a GitHub App installation @@ -13,7 +13,7 @@ export async function getInstallationToken( ): Promise { const jwtToken = generateJWT( appId, - replaceNewlinesWithBackslashN(privateKey), + convertEscapedNewlinesToNewlines(privateKey), ); const response = await fetch(