Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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);
}
probot.load(appFn);
return 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)
}
probot.load(appFn)
return probot
}