output retryafter for secondary rate limit

This commit is contained in:
Peter Evans 2024-08-15 15:24:58 +00:00
parent 59815b27ea
commit f5bdca7bbf
2 changed files with 4 additions and 2 deletions

3
dist/index.js vendored
View file

@ -1498,8 +1498,9 @@ exports.throttleOptions = {
return true;
}
},
onSecondaryRateLimit: (_, options) => {
onSecondaryRateLimit: (retryAfter, options) => {
core.warning(`Hit secondary rate limit for request ${options.method} ${options.url}`);
core.warning(`Requests may be retried after ${retryAfter} seconds.`);
}
};
const proxyFetch = (proxyUrl) => (url, opts) => {

View file

@ -25,10 +25,11 @@ export const throttleOptions = {
return true
}
},
onSecondaryRateLimit: (_, options) => {
onSecondaryRateLimit: (retryAfter, options) => {
core.warning(
`Hit secondary rate limit for request ${options.method} ${options.url}`
)
core.warning(`Requests may be retried after ${retryAfter} seconds.`)
}
}