From 1d1fdfd40fa2a679c9b4f14f00393c0a0cc453bc Mon Sep 17 00:00:00 2001 From: Tim Raderschad Date: Mon, 26 Aug 2024 10:43:26 +0200 Subject: [PATCH] fix(web): gh private key loading --- apps/web/src/env/schema.mjs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/web/src/env/schema.mjs b/apps/web/src/env/schema.mjs index fb7ff6f3..7a53360e 100644 --- a/apps/web/src/env/schema.mjs +++ b/apps/web/src/env/schema.mjs @@ -33,7 +33,10 @@ export const serverSchema = z.object({ HASHING_SECRET: z.string().min(1), ENABLE_GITHUB_APP: z.boolean().optional(), GITHUB_APP_ID: z.string().optional(), - GITHUB_APP_PRIVATE_KEY: z.string().optional(), + GITHUB_APP_PRIVATE_KEY: z + .string() + .optional() + .transform((s) => s.replace(/\\n/g, "\n")), OPENAI_API_KEY: z.string().optional(), });