mirror of
https://github.com/github/codeql-action.git
synced 2025-12-29 02:30:11 +08:00
13 lines
233 B
JavaScript
13 lines
233 B
JavaScript
function isRateLimitError(error) {
|
|
if (error.status !== 403) {
|
|
return false;
|
|
}
|
|
if (!error.response) {
|
|
return false;
|
|
}
|
|
return error.response.headers["x-ratelimit-remaining"] === "0";
|
|
}
|
|
export {
|
|
isRateLimitError
|
|
};
|