diff --git a/src/utils/getProbot.js b/src/utils/getProbot.js index 1c69c06b..dad9dd28 100644 --- a/src/utils/getProbot.js +++ b/src/utils/getProbot.js @@ -1,16 +1,12 @@ const { createProbot } = require('probot') const { findPrivateKey } = require('probot/lib/private-key') -let probot - function getProbot() { - probot = - probot || - createProbot({ - id: process.env.APP_ID, - secret: process.env.WEBHOOK_SECRET, - cert: findPrivateKey(), - }) + const probot = createProbot({ + id: process.env.APP_ID, + secret: process.env.WEBHOOK_SECRET, + cert: findPrivateKey(), + }) if (process.env.SENTRY_DSN) { probot.load(require('probot/lib/apps/sentry'))