Add configuration error for failing to clone external Git repo

This commit is contained in:
Henry Mercer 2024-04-19 19:44:05 +01:00
parent 82edfe29ce
commit 1be8c488eb
3 changed files with 13 additions and 1 deletions

View file

@ -121,6 +121,7 @@ function ensureEndsInPeriod(text: string): string {
/** Error messages from the CLI that we consider configuration errors and handle specially. */
export enum CliConfigErrorCategory {
ExternalRepositoryCloneFailed = "ExternalRepositoryCloneFailed",
GradleBuildFailed = "GradleBuildFailed",
IncompatibleWithActionVersion = "IncompatibleWithActionVersion",
InitCalledTwice = "InitCalledTwice",
@ -150,6 +151,11 @@ export const cliErrorsConfig: Record<
CliConfigErrorCategory,
CliErrorConfiguration
> = {
[CliConfigErrorCategory.ExternalRepositoryCloneFailed]: {
cliErrorMessageCandidates: [
new RegExp("Failed to clone external Git repository"),
],
},
[CliConfigErrorCategory.GradleBuildFailed]: {
cliErrorMessageCandidates: [
new RegExp("[autobuild] FAILURE: Build failed with an exception."),