Update index.ts

This commit is contained in:
luke-hagar-sp
2024-03-01 15:44:02 -05:00
parent bd7177f554
commit 45c610dcd9

View File

@@ -297,23 +297,23 @@ try {
auth: token,
throttle: {
onRateLimit: (retryAfter, options, octokit, retryCount) => {
core.warning(
octokit.log.warn(
`Request quota exhausted for request ${options.method} ${options.url}`
);
if (retryCount < 1) {
// only retries once
core.info(`Retrying after ${retryAfter} seconds!`);
octokit.log.info(`Retrying after ${retryAfter} seconds!`);
return true;
}
return false;
},
onSecondaryRateLimit: (retryAfter, options, octokit) => {
// does not retry, only logs a warning
core.warning(
octokit.log.warn(
`SecondaryRateLimit detected for request ${options.method} ${options.url}.`
);
core.info(`Retrying after ${retryAfter} seconds!`);
octokit.log.info(`Retrying after ${retryAfter} seconds!`);
return true;
},
},