diff --git a/index.ts b/app.ts similarity index 100% rename from index.ts rename to app.ts diff --git a/netlify/functions/index.ts b/netlify/functions/index.ts index 92198ac..3d4781d 100644 --- a/netlify/functions/index.ts +++ b/netlify/functions/index.ts @@ -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 }; diff --git a/tsconfig.json b/tsconfig.json index 55b3234..b5f2227 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,7 +3,6 @@ "target": "esnext", "module": "commonjs", "rootDir": "./", - "outDir": "./netlify/functions", "noEmit": true, "esModuleInterop": true, "forceConsistentCasingInFileNames": true,