Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

Commit

Permalink
fix(dependencies): upgraded to the latest octokit
Browse files Browse the repository at this point in the history
and resolved deprecation warnings
  • Loading branch information
travi committed Feb 9, 2020
1 parent e59f9c4 commit 5d2761b
Show file tree
Hide file tree
Showing 5 changed files with 89 additions and 45 deletions.
122 changes: 83 additions & 39 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"@hapi/boom": "^9.0.0",
"@hapi/hoek": "^9.0.3",
"@hapi/joi": "^17.0.2",
"@octokit/rest": "^16.29.0",
"@octokit/rest": "^16.43.1",
"btoa": "1.2.1",
"delay": "^4.3.0",
"http-status-codes": "1.4.0",
Expand Down
4 changes: 2 additions & 2 deletions src/github/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default function (githubCredentials) {
}

function acceptPR(repo, sha, prNumber, acceptAction, log) {
return octokit.pullRequests.merge({
return octokit.pulls.merge({
owner: repo.owner.login,
repo: repo.name,
pull_number: prNumber,
Expand Down Expand Up @@ -102,7 +102,7 @@ export default function (githubCredentials) {
}

async function getPullRequest(repository, number) {
const response = await octokit.pullRequests.get({
const response = await octokit.pulls.get({
owner: repository.owner.login,
repo: repository.name,
pull_number: number
Expand Down
4 changes: 2 additions & 2 deletions src/github/octokit-factory-wrapper.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import octokitFactory from '@octokit/rest';
import {Octokit} from '@octokit/rest';

export default octokitFactory;
export default Octokit;
2 changes: 1 addition & 1 deletion test/unit/github/actions-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ suite('github actions', () => {

octokitFactory.default.withArgs({auth: `token ${token}`}).returns({
search: {issuesAndPullRequests: octokitIssueSearch},
pullRequests: {
pulls: {
get: octokitGetPr,
merge: octokitMergePr
},
Expand Down

0 comments on commit 5d2761b

Please sign in to comment.