Skip to content

Commit 2da7507

Browse files
scolandreagr2m
authored andcommitted
fix: make package compatible with probot v10 (#46)
1 parent 55ddd2c commit 2da7507

File tree

3 files changed

+2477
-1865
lines changed

3 files changed

+2477
-1865
lines changed

index.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
const { createProbot } = require('probot')
2-
const { resolve } = require('probot/lib/resolver')
3-
const { findPrivateKey } = require('probot/lib/private-key')
1+
const { Probot } = require('probot')
2+
const { resolve } = require('probot/lib/helpers/resolve-app-function')
3+
const { findPrivateKey } = require('probot/lib/helpers/get-private-key')
44
const { template } = require('./views/probot')
55

66
let probot
77

88
const loadProbot = appFn => {
9-
probot = probot || createProbot({
9+
probot = probot || new Probot({
1010
id: process.env.APP_ID,
1111
secret: process.env.WEBHOOK_SECRET,
12-
cert: findPrivateKey()
12+
privateKey: findPrivateKey()
1313
})
1414

1515
if (typeof appFn === 'string') {

0 commit comments

Comments
 (0)