Skip to content

Commit

Permalink
fix: stop spamming messages
Browse files Browse the repository at this point in the history
  • Loading branch information
jakebolam committed Jan 22, 2019
1 parent 1c232f1 commit 48e620e
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions src/utils/getProbot.js
Original file line number Diff line number Diff line change
@@ -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'))
Expand Down

0 comments on commit 48e620e

Please # to comment.