Skip to content

Commit

Permalink
fix(web): use base64 for gh private key
Browse files Browse the repository at this point in the history
  • Loading branch information
cstrnt committed Aug 26, 2024
1 parent 582fd0a commit 941b8dd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/web/src/env/schema.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ export const serverSchema = z.object({
GITHUB_APP_PRIVATE_KEY: z
.string()
.optional()
.transform((s) => (s ? s.replace(/\\n/g, "\n") : undefined)),
.transform((s) =>
s ? Buffer.from(s, "base64").toString("ascii") : undefined
),
OPENAI_API_KEY: z.string().optional(),
});

Expand Down

0 comments on commit 941b8dd

Please sign in to comment.