Skip to content

Commit

Permalink
Update/migrate to latest @octokit/rest
Browse files Browse the repository at this point in the history
  • Loading branch information
webpro committed Feb 18, 2020
1 parent cec2829 commit 5ad3e18
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/plugin/github/GitHub.js
@@ -1,6 +1,6 @@
const fs = require('fs');
const path = require('path');
const GitHubApi = require('@octokit/rest');
const { Octokit } = require('@octokit/rest');
const globby = require('globby');
const mime = require('mime-types');
const _ = require('lodash');
Expand Down Expand Up @@ -121,7 +121,7 @@ class GitHub extends Release {
options.proxy = proxy;
}

const client = new GitHubApi(options);
const client = new Octokit(options);

this._client = client;
return client;
Expand Down Expand Up @@ -182,7 +182,7 @@ class GitHub extends Release {
try {
const options = {
url,
file: fs.createReadStream(filePath),
data: fs.createReadStream(filePath),
name,
headers: {
'content-type': contentType,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -56,7 +56,7 @@
"license": "MIT",
"dependencies": {
"@iarna/toml": "2.2.3",
"@octokit/rest": "16.35.0",
"@octokit/rest": "16.43.1",
"async-retry": "1.2.3",
"chalk": "3.0.0",
"cosmiconfig": "5.2.1",
Expand Down

0 comments on commit 5ad3e18

Please sign in to comment.