playlist-entry-validator/netlify/functions/validate-pr.ts

23 lines
532 B
TypeScript
Raw Normal View History

import type { Handler, HandlerEvent, HandlerContext } from '@netlify/functions';
import { createProbot } from 'probot';
import { appFn } from '../../appFn';
const privateKey = (process.env.PRIVATE_KEY as string).replace(/\\n/gm, '\n');
const handler: Handler = async (
event: HandlerEvent,
context: HandlerContext
) => {
const probot = createProbot({ overrides: { privateKey } });
await appFn(probot);
return {
statusCode: 200,
body: 'Playlist Entry Validator by Maciej Pędzich'
};
};
export { handler };