Skip to content

chore(deps): update dependency @octokit/rest to v16 #1595

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 20, 2019

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Dec 19, 2019

This PR contains the following updates:

Package Type Update Change
@octokit/rest devDependencies major ^15.4.1 -> ^16.0.0

Release Notes

octokit/rest.js

v16.35.2

Compare Source

Bug Fixes

v16.35.1

Compare Source

Bug Fixes

v16.35.0

Compare Source

Features
  • .apps.checkAuthorization()
  • .apps.checkToken()
  • .apps.deleteAuthorization()
  • .apps.deleteToken()
  • .apps.resetAuthorization()
  • .apps.resetToken()
  • .apps.revokeAuthorizationForApplication()
  • .apps.revokeGrantForApplication()
Deprecations
  • .apps.checkAuthorization()
  • .apps.resetAuthorization()
  • .apps.revokeAuthorizationForApplication()
  • .apps.revokeGrantForApplication()
  • .oauthAuthorizations.checkAuthorization
  • .oauthAuthorizations.createAuthorization
  • .oauthAuthorizations.deleteAuthorization
  • .oauthAuthorizations.deleteGrant
  • .oauthAuthorizations.getAuthorization
  • .oauthAuthorizations.getGrant
  • .oauthAuthorizations.getOrCreateAuthorizationForApp
  • .oauthAuthorizations.getOrCreateAuthorizationForAppAndFingerprint
  • .oauthAuthorizations.listAuthorizations
  • .oauthAuthorizations.listGrants
  • .oauthAuthorizations.resetAuthorization
  • .oauthAuthorizations.revokeAuthorizationForApplication
  • .oauthAuthorizations.revokeGrantForApplication
  • .oauthAuthorizations.updateAuthorization

See also: https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api/

Fixes
  • .repos.listTopics() & .repos.replaceTopics(): required mercy preview header set by default

v16.34.1

Compare Source

Bug Fixes
  • typescript: Include done callback in Paginate interface (6e2051b)

v16.34.0

Compare Source

Bug Fixes
  • remove obsolete plugin to normalize git reference responses (3933c24)
Features
  • multi-line review comments, client_payload parameter for creating a repository dispatch event, listing installations for an organization (e891d4e)

v16.33.1

Compare Source

Bug Fixes

v16.33.0

Compare Source

Features
  • options: add timeZone option (8a1fb13)

v16.32.0

Compare Source

Features
  • types: add deprecation jsdoc for deprecated methods (f7c31af)
  • types: mark params deprecated if description has 'deprecated' (ffe9aaa)

v16.31.0

Compare Source

Bug Fixes
  • index.js: remove unused scope query field (58443cd)
Features
  • deprecated: Show a message for deprecated methods (453ebcc)

v16.30.2

Compare Source

Bug Fixes

v16.30.1

Compare Source

Bug Fixes

v16.30.0

Compare Source

Features
  • octokit.pulls.createFromIssue()` is deprecated. Useoctokit.pulls.create()` instead (6f939ad)

v16.29.0

Compare Source

Bug Fixes
  • luke-cage header is not required (9926988)
  • restrictions.teams and restrictions.users are required for `octokit.repos.updateBranchProtection() (d68aa77)
  • add deprecation messages for octokit.teams.{add,get,remove}Member() (f4e0a1b)
  • add enum for privacy parameter for octokit.teams.edit() (71ba2ae)
  • alias for "sha" is "ref" for octokit.repos.getCommit() (9164417)
  • remove incorrect page/per_page parameters from PATCh requests (6395735)
  • remove incorrect page/per_page parameters from POST requests (a7a45ac)
  • remove unused page and per_page parameters from octokit.repos.listProtectedBranchTeamRestrictions() (3c04006)
  • set "luke-cage" preview request for branch protection endpoint methods (6a3d318)
  • validate enum values always as strings (22fb9ab)
Features
  • octokit.pulls.createReviewCommentReply() (c7831d3)
  • deprecation: octokit.pulls.createCommentReply() has been renamed to octokit.pulls.createComment() (b59f0b5)
  • deprecation: octokit.repos.listProtectedBranchTeamRestrictions & octokit.repos.listTeamsWithAccessToProtectedBranch -> octokit.repos.getTeamsWithAccessToProtectedBranch (9e3b5b1)
  • deprecation: octokit.repos.listProtectedBranchUserRestrictions & octokit.repos.listUsersWithAccessToProtectedBranch -> octokit.repos.getUsersWithAccessToProtectedBranch (5896712)
  • octokit.repos.addProtectedBranchAppRestrictions(), octokit.repos.removeProtectedBranchAppRestrictions(), octokit.repos.replaceProtectedBranchAppRestrictions() (542c7e7)
  • octokit.repos.createDispatchEvent() (eee4ae6)
  • octokit.repos.listAppsWithAccessToProtectedBranch() -> octokit.repos.getAppsWithAccessToProtectedBranch() (4d4fe03)

v16.28.9

Compare Source

Bug Fixes
  • package: update universal-user-agent to version 4.0.0 (b5a96a9)

v16.28.8

Compare Source

Bug Fixes
  • package: remove unused url-template dependency (484eccd)

v16.28.7

Compare Source

Bug Fixes
  • normalize pagination for "List installations for a user" endpoint (#​1440) (7b51cee)

v16.28.6

Compare Source

Bug Fixes

v16.28.5

Compare Source

Bug Fixes
  • "owner" parameter is no longer conflicting in octokit.repos.createUsingTemplate() (#​1431) (fe605fe)

v16.28.4

Compare Source

Bug Fixes
  • package: update universal-user-agent to version 3.0.0 (a579ae5)

v16.28.3

Compare Source

Bug Fixes

v16.28.2

Compare Source

Bug Fixes

v16.28.1

Compare Source

Bug Fixes
  • add "rocket" and "eyes" to set of supported reactions (69462e0)

v16.28.0

Compare Source

Features
  • commit_sha parameter forrepos.listCommentsForCommit()andrepos.createCommitComment()` (1e7c3a8)
  • repos.createOrUpdateFile() (63a5e99)
  • repos.enableAutomatedSecurityFixes() and repos.disableAutomatedSecurityFixes() (ebab182)
  • repos.updateBranch() (5ba501e)

v16.27.3

Compare Source

Bug Fixes
  • typescript: Octokit#plugin argument type for plugins (#​1385) (05bc206)

v16.27.2

Compare Source

Bug Fixes
  • author.* and committer.* parameter validation for .repos.deleteFile() (#​1384) (2155b1a)

v16.27.1

Compare Source

Bug Fixes
  • typo in deprecation message for .repos.getCommitRefSha() (ade2d00)

v16.27.0

Compare Source

Features
  • octokit.repos.getCommitRefSha() is deprecated, use octokit.repos.getCommit() instead (9e0aeaf)

v16.26.0

Compare Source

Features
  • .repos.enableVulnerabilityAlerts()
  • .repos.disableVulnerabilityAlerts()
Fixes
  • source parameter for .repos.enablePagesSite()

v16.25.6

Compare Source

Bug Fixes

v16.25.5

Compare Source

Bug Fixes
  • package: update deprecation to version 2.0.0 (06af662)

v16.25.4

Compare Source

Bug Fixes

v16.25.3

Compare Source

Bug Fixes

v16.25.2

Compare Source

Bug Fixes
  • do not mutate options passed to endpoint methods (fe51f06)

v16.25.1

Compare Source

Bug Fixes

v16.25.0

Compare Source

Features

v16.24.3

Compare Source

Bug Fixes
  • throw 400 Bad Request error when octokit.issues.get() without parameters (a102378)

v16.24.2

Compare Source

Bug Fixes
  • implement deprecation for parameters in .endpoint() and .endpoint.merge() (8cebbfa)

v16.24.1

Compare Source

Features
  • :commit_sha parameter for .git.getCommit(). Deprecates :sha (1b98f9c)
  • :issue_number, :milestone_number, :pull_number parameters. Deprecates :number (87dc7c6)
  • .repos.listBranchesForHeadCommit() (473642d)
  • .repos.listPullRequestsAssociatedWithCommit() (4a74d40)
Bug Fixes

v16.24.0

Compare Source

⚠️ This release has a bug, see #​1323

Update to v16.24.1 instead.

v16.23.5

Compare Source

Bug Fixes
  • .paginate() with results namespace (GET /installation/repositories, single page response) (27e2977)

v16.23.4

Compare Source

Bug Fixes

v16.23.3

Compare Source

Bug Fixes

v16.23.2

Compare Source

Bug Fixes
  • normalize pagination for responses with repository_selection property (27dff8c)

v16.23.1

Compare Source

Bug Fixes

v16.23.0

Compare Source

Features
  • options.auth can be set to token without a prefix (736174e)

v16.22.0

Compare Source

Features

v16.21.1

Compare Source

Bug Fixes
  • assure single object/array responses for .git.getRef()/.git.listRefs() (8ed1b9d)

v16.21.0

Compare Source

Features
  • author.*, committer.*, signature parameters for .git.createCommit() (dca2d51)
  • draft argument for creating a pull request (0e98b5b)
Bug Fixes
  • call auth.on2fa again if OTP becomes invalid (eb1ebab)

v16.20.0

Compare Source

Deprecation
  • deprecate .total_count, .incomplete_results and .<namespace> properties from paginated results (e34a1df)
Bug Fixes

v16.19.0

Compare Source

Features
  • octokit.repos.enablePagesSite() and octokit.repos.disablePagesSite() (a91f162), closes #​1284
Bug Fixes
  • mister-fantastic preview not required for .repos.{getPages|updateInformationAboutPagesSite} (21f54ed)

v16.18.1

Compare Source

Bug Fixes
  • two-factor auth: persist one-time password header on subsequent requests (#​1281) (db6af77)

v16.18.0

Compare Source

Features
  • media type format and previews (6ac0b9f)

    octokit.issues.get({
      owner, 
      repo, 
      number,
      mediaType: {
        format: 'full+json',
        previews: ['symmetra']
      }
    })
Bug Fixes
  • don’t swallow errors thrown in options.auth function (6660902)

v16.17.1

Compare Source

Bug Fixes
  • log a deprecations only once, and not as Error (547fe40)
  • set machine-man preview for .apps.listRepos() and .apps.getBySlug() (b2be62c)

v16.17.0

Compare Source

Features
Deprecations
  • octokit.licenses.list()

v16.16.5

Compare Source

Bug Fixes

v16.16.4

Compare Source

Bug Fixes
  • package: update before-after-hook (aa54fb8)

v16.16.3

Compare Source

Bug Fixes

v16.16.2

Compare Source

Bug Fixes
  • paginate search results (8373934)

v16.16.1

Compare Source

Bug Fixes

v16.16.0

Compare Source

Features
  • .projects.createForAuthenticatedUser(), .projects.listForUser() (735d46f)

v16.15.1

Compare Source

Bug Fixes
  • don’t swallow errors thrown in options.auth function (1a91248)

v16.15.0

Compare Source

Bug Fixes
  • name parameter no longer required for octokit.repos.createHook() (6e53694)
Features
  • sort and direction parameters for octokit.repos.listForOrg() (2f9f5df)

v16.14.1

Compare Source

Bug Fixes

v16.14.0

Compare Source

Features

This release adds 4 new methods

  1. octokit.log.debug()
  2. octokit.log.info()
  3. octokit.log.warn()
  4. octokit.log.error()

They can be configured using the log client option. By default, octokit.log.debug() and octokit.log.info() are no-ops, while the other two call console.warn() and console.error() respectively.

This can be used for debugging. The simplest way is to set the log option to console

const octokit = require("@&#8203;octokit/rest")({
  log: console
})

console.request("/")

This will log

request { method: "GET",
  baseUrl: "https://api.github.com",
  headers:
   { accept: "application/vnd.github.v3+json",
     "user-agent":
      "octokit.js/0.0.0-semantically-released Node.js/10.15.0 (macOS Mojave; x64)" },
  request: {},
  url: "/" }
GET / - 200 in 514ms

If you like to support a configurable log level, we recommend using the console-log-level module

const octokit = require("@&#8203;octokit/rest")({
  log: require("console-log-level")({ level: "info" })
})

console.request("/")

This will only log

GET / - 200 in 514ms

v16.13.4

Compare Source

Bug Fixes
  • typescript: auth.client_id, auth.client_secret → auth.clientId, auth.clientSecret (#​1227) (1ac39cd)

v16.13.3

Compare Source

Bug Fixes
  • typescript: accept { auth: () => } constructor option (0e11699)

v16.13.2

Compare Source

Bug Fixes
  • typescript: two-factor authentication is on2fa() not on2Fa() (#​1222) (28a6f32)

v16.13.1

Compare Source

Bug Fixes
  • typescript: update typings with new options for constructor (2b73d01)

v16.13.0

Compare Source

Features
  • "auth" constructor options (45a4836)

v16.12.0

Compare Source

Features
  • userAgent, previews and request options (8cf0d4d)

In preparation for v17, instead of

const octokit = new Octokit({
  headers: {
    accept: 'application/vnd.github.jean-grey-preview+json,application/vnd.github.symmetra-preview+json',
    'user-agent': 'octokit/rest.js v1.2.3' // v1.2.3 will be current version
  },
  timeout: 0,
  agent: undefined
})

the new options will be

const octokit = new Octokit({
  userAgent: 'myapp v1.2.3',
  previews: [
    'jean-grey-preview',
    'symmetra-preview'
  ],
  request: {
    timeout: 0,
    agent: undefined
  }
})

The old options will continue to work, but will be deprecated. The baseUrl option will remain the same.

v16.11.0

Compare Source

Bug Fixes
  • handle invalid otp for 2FA (d29ec5a)
Features
  • Resolve requsets with response.url (9517b47)

v16.10.0

Compare Source

Features
  • two-factor authentication (fb38885)

v16.9.0

Compare Source

Features
  • octokit.oauthAuthorizations.getOrCreateAuthorizationForAppAndFingerprint() - octokit.oauthAuthorizations.getOrCreateAuthorizationForAppFingerprint() is now deprecated (fe4d9fb)
  • octokit.repos.updateReview({owner,repo,number,review_id,body}) (6527b32)
  • octokit.search.issuesAndPullRequests() - octokit.search.issues() is now deprecated (a8e392a)
Bug Fixes
  • octokit.projects.update() - invalid public parameter replaced with private (fecabe5)
  • octokit.search.repos() - sort parameter now accepts 'help-wanted-issues' (d528c50)

v16.8.1

Compare Source

Bug Fixes
  • do not load the same plugin again (b4c38e2)

v16.8.0

Compare Source

Features
  • typescript: octokit.registerEndpoints() definitions (724f8f6)
  • typescript: complete .endpoint types (c068824)
Bug Fixes
  • allow to use octokit.registerEndpoints() to merge new endpoints into existing scope (2c672ca)

v16.7.0

Compare Source

Features
  • typescript: custom Octokit constructor options for plugins (06b2069)
  • typescript: Octokit.plugin() definition that returns correct Octokit Class API (2ef7811)

v16.6.1

Compare Source

Bug Fixes
  • add responses mapped to undefined to final result (0737ada)

v16.6.0

Compare Source

Features

v16.5.0

Compare Source

Features
  • typescript: Octokit.Request & Octokit.Paginate interfaces (1623a1d)

v16.4.0

Compare Source

Features
  • typescript: Definitions for octokit.request() and octokit.paginate() (#​1184) (b9a8650)

v16.3.2

Compare Source

Bug Fixes

v16.3.1

Compare Source

Bug Fixes
  • use URL in "Link" response header for pagination (cab5b62)

v16.3.0

Compare Source

Features

v16.2.0

Compare Source

Features

v16.1.0

Compare Source

Features

v16.0.5

Compare Source

Bug Fixes
  • typescript: octokit.authenticate definitions using overloads (23ca22d)

v16.0.4

Compare Source

Bug Fixes
  • package: remove node-fetch dependency (1d2ed27)

Merci @​pvdlg for their help 💐

v16.0.3

Compare Source

Bug Fixes
  • aliasing octokit.gitdataoctokit.git, octokit.authorizationoctokit.oauthAuthorizations, octokit.pullRequestsoctokit.pulls (0766d51)

Thanks to @​hipstersmoothie for their help 💐

v16.0.2

Compare Source

Bug Fixes

v16.0.1

Compare Source

To upgrade to v16, make sure you have the latest v15 release installed first:

npm install @&#8203;octokit/[email protected]

Now run the tests and look for DEPRECATED messages in the logs. Once you see no more deprecations, upgrading to v16 should cause no problems.

BREAKING CHANGES
  • all previously deprecated methods have been removed

  • preview headers that are not required to use an API have been removed

  • .gitdata.getTags() has been removed. Use .gitdata.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. They have been moved tot 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

  • Dropped support for node 4

  • error.message is no longer a JSON string containing GitHub’s error message. Instead the JSON is parsed internally and error properties are assigned with its value. This is not technically a breaking change but a bug fix, but as this bug was around for a long time and plenty of apps depend on JSON.parse(error.message) to be working, we treat it as a breaking change by way of precaution

  • error.status is now the response status code number. The status text is no longer returned

Features
Bug Fixes
  • routes: remove validation for milestone parameter as it cannot be derived from octokit/routes (4d04d17)
  • only set preview headers required to use the API (1628821)
  • parse JSON from GitHub error messages (dd6306e)
Continuous Integration
  • travis: drop tests in node 4 & 9, test in node 10 (ad8b1e5)
Bug Fixes in v16.0.1
  • typescript: Adding return types (18ac5bf), closes #​1116
  • typescript: Adding the noImplicitAny flag to validate:ts (ef4d35a)
  • typescript: Github.plugin is a static method, not an instance method (01763bf)
  • typescript: include a header object when transforming Content-Type and Content-Length to headers.content-type and headers.content-length (0b9cc37)

Thanks @​mamodom for your great help with these Typescript fixes 💐

v16.0.0

Compare Source

16.0.0 was a pre-release, see v16.0.1 for release notes


Renovate configuration

📅 Schedule: At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻️ Rebasing: Whenever PR becomes conflicted, or if you modify the PR title to begin with "rebase!".

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

Newsflash: Renovate has joined WhiteSource, and is now free for all use. Learn more or view updated terms and privacy policies.

@netlify
Copy link

netlify bot commented Dec 19, 2019

Deploy preview for ant-desing-vue processing.

Building with commit bd43ed2

https://app.netlify.com/sites/ant-desing-vue/deploys/5dfc554edadf4b00095d2eac

@renovate renovate bot force-pushed the renovate/octokit-rest-16.x branch from 7d57c51 to fd12cf3 Compare December 20, 2019 03:28
@codecov
Copy link

codecov bot commented Dec 20, 2019

Codecov Report

Merging #1595 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1595   +/-   ##
=======================================
  Coverage   88.03%   88.03%           
=======================================
  Files         157      157           
  Lines        5408     5408           
  Branches     1524     1524           
=======================================
  Hits         4761     4761           
  Misses        578      578           
  Partials       69       69

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2184e91...bd43ed2. Read the comment docs.

@renovate renovate bot force-pushed the renovate/octokit-rest-16.x branch 2 times, most recently from 5405c59 to c278429 Compare December 20, 2019 04:58
@renovate renovate bot force-pushed the renovate/octokit-rest-16.x branch from c278429 to bd43ed2 Compare December 20, 2019 04:59
@tangjinzhou tangjinzhou merged commit 8ee56de into master Dec 20, 2019
@renovate renovate bot deleted the renovate/octokit-rest-16.x branch December 20, 2019 05:02
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants