(error: unknown)
| 55 | * Type guard to check if an error is an Octokit RequestError. |
| 56 | */ |
| 57 | export const isOctokitRequestError = (error: unknown): error is RequestError => { |
| 58 | return ( |
| 59 | error !== null && |
| 60 | typeof error === 'object' && |
| 61 | 'status' in error && |
| 62 | typeof error.status === 'number' && |
| 63 | 'name' in error && |
| 64 | error.name === 'HttpError' |
| 65 | ); |
| 66 | }; |
| 67 | |
| 68 | // Limit concurrent GitHub requests to avoid hitting rate limits and overwhelming installations. |
| 69 | const MAX_CONCURRENT_GITHUB_QUERIES = 5; |