v11.0.0
BREAKING CHANGES
For a smooth upgrade, make sure to update to the latest Probot v10 version first (npm install probot@10
), run your tests, and address all deprecation messages. Nearly all removed APIs have previously been deprecated.
-
deprecated
context.octokit.*
have been removed via@octokit/plugin-rest-endpoint-methods
v4 -
probot.server
property removed. Build your own server instead usingimport { Server } from "probot"
-
probot.load()
is now asynchronous and no longer returns the instance -
express-async-errors
is no longer used. -
Probot
constructor parameter no longer supported increateNodeMiddleware(app, { Probot })
. Pass aprobot
instance instead:createNodeMiddleware(app, { probot })
-
getOptions()
has been removed. Use{ probot: createProbot() }
instead -
probot.load(appFn)
no longer acceptsappFn
to be a path string. Pass the actual function instead. -
probot.setup()
removed. Use the newServer
class instead:const { Server, Probot } = require("probot") const server = new Server({ // optional: host, port, webhookPath, webhookProxy, Probot: Probot.defaults({ id, privateKey, ... }) }) // load probot app function await server.load((app) => {}) // start listening to requests await server.start() // stop server with: await server.stop()
If you have more than one app function, combine them in a function instead
const app1 = require("./app1") const app2 = require("./app2") module.exports = function app ({ probot, getRouter }) { await app1({ probot, getRouter }) await app2({ probot, getRouter }) }
-
probot.start()
/probot.stop()
removed. Use the newServer
class instead:const { Server, Probot } = require("probot") const server = new Server({ Probot: Probot.defaults({ id, privateKey, ... }) // optional: host, port, webhookPath, webhookProxy, }) // load probot app function await server.load((app) => {}) // start listening to requests await server.start() // stop server with: await server.stop()
-
REDIS_URL
is ignored when usingProbot
constructor. Usenew Probot({ redisConfig: redis://... })
instead -
Probot
constructor no longer reads environment variables. Pass options instead, orimport { createProbot } from "probot"
instead -
Probot.run()
has been removed. Useimport { run} from "probot"
instead -
context.github
has been removed. Usecontext.octokit
instead -
context.event
has been removed. Usecontext.name
instead -
app.route()
has been removed. Use thegetRouter()
argument from the app function instead:(app, { getRouter }) => { ... }
-
app.router
has been removed. UsegetRouter()
from the app function instead:(app, { getRouter }) => { ... }
-
probot.logger
has been removed. Useprobot.log
instead -
new Probot({ id })
has been removed. Usenew Probot({ appId })
instead -
new Probot({ cert })
has been removed. Usenew Probot({ privateKey })
instead -
probot.webhook
has been removed. Useprobot.webhooks
instead -
createProbot(options)
no longer supports any keys besidesoverrides
,defaults
, orenv
-
options.throttleOptions
has been removed. Setoptions.Octokit
toProbotOctokit.defaults({ throttle })
instead -
import { Application } from probot
has been removed. Useimport { Probot } from probot
instead, the APIs are the same