Skip to content

@probotbot probotbot released this Mar 8, 2019 · 28 commits to master since this release

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 errors

    • error.name is now GraphqlError, was GraphQLQueryError
    • error.query is now error.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}) use octokit.request('GET /user/:id', {id})
    • Instead of octokit.repos.getById({id}) use octokit.request('GET /repositories/:id', {id})
  • octokit.enterprise.* methods have been removed. Use your own @ocotkit/rest instance and install the @octokit/enterprise-rest plugin

  • octokit.issues.addLabels sends labels 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.

    1. Use the @octokit/enterprise-compatibility plugin
    2. Use the @octokit/enterprise-rest plugin loading all routes for the GHE version you want to support
    3. Use octokit.request() directly:
    octokit.request('/repos/:owner/:repo/issues/:number/labels', {
      owner,
      repo,
      number,
      data: ['label1', 'label2']
    })
  • 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. Use event.name instead

  • Deprecated new Probot({catchErrors}) has been removed

  • probot simulate hase been removed, use probot receive instead

Features

Deprecations

  • context.github.query() is now context.github.graphql()

  • context.github.query(query, variables, headers) is now context.github.graphql(query, options). options.headers is passed as headers. Other options are passed as variables, with the exception of method, baseUrl, url, headers, request, and query.

  • context.github.paginate(promise, mapFn) is now context.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)
Assets 2
You can’t perform that action at this time.