Skip to content

Commit

Permalink
Merge pull request #2252 from github/henrymercer/failed-external-repo…
Browse files Browse the repository at this point in the history
…-config-error

Add configuration error for failing to clone external Git repo
  • Loading branch information
henrymercer authored Apr 22, 2024
2 parents 82edfe2 + 1be8c48 commit f45390c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions lib/cli-errors.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/cli-errors.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions src/cli-errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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."),
Expand Down

0 comments on commit f45390c

Please sign in to comment.