Inform users that their Github organization has IP allow list enabled (#4270)

This commit is contained in:
Kamil Kisiela 2024-03-18 14:38:10 +01:00 committed by GitHub
parent 10ed2db693
commit 89f3d0c56d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -265,6 +265,13 @@ export class GitHubIntegrationManager {
};
}
if (error.message.includes('organization has an IP allow list')) {
return {
success: false,
error: `Your GitHub Organization has an IP allow list enabled, and our IP address is not permitted to access this resource. Please contact our support team to obtain the IP address.`,
};
}
return {
success: false,
error:
@ -411,7 +418,7 @@ export class GitHubIntegrationManager {
}
function isOctokitRequestError(error: unknown): error is RequestError {
return error instanceof RequestError;
return !!error && typeof error === 'object' && 'code' in error && 'status' in error;
}
export type GitHubCheckRun = {