File tree 2 files changed +13
-10
lines changed
2 files changed +13
-10
lines changed Original file line number Diff line number Diff line change 1
1
'use strict'
2
2
const inquirer = require ( 'inquirer' )
3
- const Octokit = require ( '@octokit/rest' )
4
- . plugin ( require ( '@octokit/plugin-throttling' ) )
5
- . plugin ( require ( '@octokit/plugin-retry' ) )
3
+ const { retry } = require ( '@octokit/plugin-retry' )
4
+ const { throttling } = require ( '@octokit/plugin-throttling' )
5
+ const { Octokit } = require ( '@octokit/rest' )
6
+
7
+ const OctokitRest = Octokit
8
+ . plugin ( retry , throttling )
6
9
7
10
const { graphql } = require ( '@octokit/graphql' )
8
11
@@ -75,7 +78,7 @@ async function getOctokit (opts = {}) {
75
78
let {
76
79
token,
77
80
log,
78
- onAbuseLimit ,
81
+ onSecondaryRateLimit ,
79
82
onRateLimit
80
83
} = opts
81
84
@@ -94,10 +97,10 @@ async function getOctokit (opts = {}) {
94
97
95
98
log = log || console
96
99
97
- const octokit = Octokit ( {
100
+ const octokit = new OctokitRest ( {
98
101
auth,
99
102
throttle : {
100
- onAbuseLimit : onAbuseLimit || ( ( err ) => {
103
+ onSecondaryRateLimit : onSecondaryRateLimit || ( ( err ) => {
101
104
log . error ( err )
102
105
} ) ,
103
106
onRateLimit : onRateLimit || ( ( err , options ) => {
Original file line number Diff line number Diff line change 34
34
"standard" : " ^12.0.1"
35
35
},
36
36
"dependencies" : {
37
- "@octokit/graphql" : " ^4.3.1 " ,
38
- "@octokit/plugin-retry" : " ^2.2.0 " ,
39
- "@octokit/plugin-throttling" : " ^2.6 .0" ,
40
- "@octokit/rest" : " ^16.28.2 " ,
37
+ "@octokit/graphql" : " ^7.1.0 " ,
38
+ "@octokit/plugin-retry" : " ^6.0.1 " ,
39
+ "@octokit/plugin-throttling" : " ^8.2 .0" ,
40
+ "@octokit/rest" : " ^20.1.1 " ,
41
41
"@primer/octicons" : " ^9.1.1" ,
42
42
"@wesleytodd/buildcss" : " 0.0.6" ,
43
43
"@wesleytodd/buildjs" : " 0.0.8" ,
You can’t perform that action at this time.
0 commit comments