Releases: probot/probot
v9.2.2
v9.2.1
v9.2.0
v9.1.1
v9.1.0
v9.0.2
v9.0.1
v9.0.0
Breaking changes
-
鈿狅笍 all previously deprecated methods have been removed. Make sure you address all deprecation messages you see with Probot v7 before upgrading. -
context.github.query()
: Changes in errors thrown due to GraphQL errorserror.name
is nowGraphqlError
, wasGraphQLQueryError
error.query
is nowerror.request.query
-
preview headers that are not required to use an API are no longer set automatically. Set using
{headers: { accept: '<preview header here>'}
-
.gitdata.getTags()
has been removed. Use.git.listRefs({namespace: tags})
instead -
Methods for undocumented endpoints have been removed.
- Instead of
octokit.users.getById({id})
useoctokit.request('GET /user/:id', {id})
- Instead of
octokit.repos.getById({id})
useoctokit.request('GET /repositories/:id', {id})
- Instead of
-
octokit.enterprise.*
methods have been removed. Use your own@ocotkit/rest
instance and install the@octokit/enterprise-rest
plugin -
octokit.issues.addLabels
sendslabels
parameter with "labels
" namespace instead of sending the array in the request body root. This is not supported by GitHub Enterprise 2.15 or older. You have several options.- Use the
@octokit/enterprise-compatibility
plugin - Use the
@octokit/enterprise-rest
plugin loading all routes for the GHE version you want to support - Use
octokit.request()
directly:
octokit.request('/repos/:owner/:repo/issues/:number/labels', { owner, repo, number, data: ['label1', 'label2'] })
- Use the
-
The
milestone
parameter is no longer validated using a regex as it cannot be derived from octokit/routes -
error.status
is now the response status code number. The status text is no longer returned -
Deprecated
event.event
property is no longer supported. Useevent.name
instead -
Deprecated
new Probot({catchErrors})
has been removed -
probot simulate
hase been removed, useprobot receive
instead
Features
- Pagination: the
.paginate
API from @octokit/rest.js is now used- .paginate(options, mapFn) now accepts the request options, just like
ocotkit.request
. - .paginate.iterator(options) allows for async iteration.
- .paginate(options, mapFn) now accepts the request options, just like
- Custom requests using octokit.request & octokit.request.endpoint.
- Improved Typescript definitions for
context.github
- add constructor option for redis config (#846) (4bbf29c), closes #845
- Add overloads for all Webhook events (#858) (19fb9d2)
- Cluster support for request throttling (86f5312)
- moar Typescript foo (fa9a228)
- new github.paginate API, github.paginate.iterator() (e0868f1)
- new throttling & automated retries (c6cbc97)
- options.Octokit to pass custom Octokit version (#840) (9b11084)
- standalone run command (#751) (bd42feb)
Deprecations
-
context.github.query()
is nowcontext.github.graphql()
-
context.github.query(query, variables, headers)
is nowcontext.github.graphql(query, options)
.options.headers
is passed as headers. Other options are passed as variables, with the exception ofmethod
,baseUrl
,url
,headers
,request
, andquery
. -
context.github.paginate(promise, mapFn)
is nowcontext.github.paginate(requestOptions, mapFn)
. Example:Before
const allIssues = await context.github.paginate( context.github.issues.getAll(context.repo()) )
After
const allIssues = await context.github.paginate( context.github.issues.getAll.endpoint.merge(context.repo()) )
Bug Fixes
- create only a single redis connection when REDIS_URL is set (6638331)
- error.code => error.status (#871) (596a42d)
- make
.issues.addLabels()
compatible with current GHE versions (aa1c570) - make smee-client requirement optional again (#868) (1581315)
- pass baseUrl option to @octokit/app (#839) (eab6851)
- remove deprecated "simulate" command (57587b8)
- remove deprecated
catchErrors
constructor option (f46c41c) - remove handling deprecated
.event
property (1f76ec6) - logging: error.status is the new error.code. The old error.status is no more (2918249)
- package: update pkg-conf to version 3.0.0 (b77e06c)
- remove unnecessary escaping in private key error message (#862) (8c47d1f)
- Update dependencies (#870) (d32ce60)
- typescript: @octokit/webhooks import (#854) (30ac1a4)