Skip to content

Commit a562e12

Browse files
committed
Merge branch 'mschoettle-upgrade-octokit'
2 parents 62ba72c + a6c3cb6 commit a562e12

File tree

4 files changed

+18
-75
lines changed

4 files changed

+18
-75
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#
77
# If you're interested in testing other base images, take a look at this reference:
88
# https://github.com/BretFisher/nodejs-rocks-in-docker
9-
FROM node:16-bullseye-slim
9+
FROM node:22-bullseye-slim
1010

1111
ARG USERNAME=migrator
1212
ARG USER_UID=2000

package-lock.json

Lines changed: 11 additions & 68 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
@@ -29,7 +29,7 @@
2929
"@gitbeaker/node": "^35.1.0",
3030
"@octokit/plugin-throttling": "^11.0.1",
3131
"@octokit/rest": "^21.1.1",
32-
"@octokit/types": "^6.34.0",
32+
"@octokit/types": "^13.8.0",
3333
"aws-sdk": "^2.1053.0",
3434
"axios": "^1.6.0",
3535
"mime-types": "^2.1.34",

src/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,21 +68,21 @@ const githubApi = new MyOctokit({
6868
},
6969
auth: 'token ' + settings.github.token,
7070
throttle: {
71-
onRateLimit: async (retryAfter, options) => {
71+
onRateLimit: async (retryAfter, options, octokit, retryCount) => {
7272
console.log(
7373
`Request quota exhausted for request ${options.method} ${options.url}`
7474
);
7575
console.log(`Retrying after ${retryAfter} seconds!`);
7676
return true;
7777
},
78-
onAbuseLimit: async (retryAfter, options) => {
78+
onSecondaryRateLimit: async (retryAfter, options, octokit, retryCount) => {
7979
console.log(
80-
`Abuse detected for request ${options.method} ${options.url}`
81-
);
80+
`SecondaryRateLimit detected for request ${options.method} ${options.url}`
81+
)
8282
console.log(`Retrying after ${retryAfter} seconds!`);
8383
return true;
8484
},
85-
minimumAbuseRetryAfter: 1000,
85+
fallbackSecondaryRateRetryAfter: 600,
8686
},
8787
});
8888

0 commit comments

Comments
 (0)