Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const {createProbot} = require('probot');
const {resolve} = require('probot/lib/resolver');
const {findPrivateKey} = require('probot/lib/private-key');
const {GraphQLClient} = require('graphql-request');
const githubApp = require('@graphql-inspector/github').default;
let probot;
const loadProbot = appFn => {
probot =
probot ||
createProbot({
id: process.env.APP_ID,
secret: process.env.WEBHOOK_SECRET,
cert: findPrivateKey(),
});
if (typeof appFn === 'string') {
appFn = resolve(appFn);
}