Add handling of non-multiline PRIVATE_KEY variable

This commit is contained in:
Maciej Pędzich 2023-07-06 11:42:13 +02:00
parent e33aadee11
commit 80368e0647
3 changed files with 5 additions and 3 deletions

View File

View File

@ -2,10 +2,13 @@ import {
createLambdaFunction,
createProbot
} from '@probot/adapter-aws-lambda-serverless';
import { appFn } from '../..';
import { appFn } from '../../app';
const privateKey = (process.env.PRIVATE_KEY as string).replace(/\\n/gm, '\n');
const handler = createLambdaFunction(appFn, {
probot: createProbot()
probot: createProbot({ overrides: { privateKey } })
});
export { handler };

View File

@ -3,7 +3,6 @@
"target": "esnext",
"module": "commonjs",
"rootDir": "./",
"outDir": "./netlify/functions",
"noEmit": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,