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

Commit 5d2761b

Browse files
committed
fix(dependencies): upgraded to the latest octokit
and resolved deprecation warnings
1 parent e59f9c4 commit 5d2761b

File tree

5 files changed

+89
-45
lines changed

5 files changed

+89
-45
lines changed

package-lock.json

Lines changed: 83 additions & 39 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
"@hapi/boom": "^9.0.0",
8787
"@hapi/hoek": "^9.0.3",
8888
"@hapi/joi": "^17.0.2",
89-
"@octokit/rest": "^16.29.0",
89+
"@octokit/rest": "^16.43.1",
9090
"btoa": "1.2.1",
9191
"delay": "^4.3.0",
9292
"http-status-codes": "1.4.0",

src/github/actions.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export default function (githubCredentials) {
6868
}
6969

7070
function acceptPR(repo, sha, prNumber, acceptAction, log) {
71-
return octokit.pullRequests.merge({
71+
return octokit.pulls.merge({
7272
owner: repo.owner.login,
7373
repo: repo.name,
7474
pull_number: prNumber,
@@ -102,7 +102,7 @@ export default function (githubCredentials) {
102102
}
103103

104104
async function getPullRequest(repository, number) {
105-
const response = await octokit.pullRequests.get({
105+
const response = await octokit.pulls.get({
106106
owner: repository.owner.login,
107107
repo: repository.name,
108108
pull_number: number
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import octokitFactory from '@octokit/rest';
1+
import {Octokit} from '@octokit/rest';
22

3-
export default octokitFactory;
3+
export default Octokit;

test/unit/github/actions-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ suite('github actions', () => {
4747

4848
octokitFactory.default.withArgs({auth: `token ${token}`}).returns({
4949
search: {issuesAndPullRequests: octokitIssueSearch},
50-
pullRequests: {
50+
pulls: {
5151
get: octokitGetPr,
5252
merge: octokitMergePr
5353
},

0 commit comments

Comments
 (0)