Skip to content

Commit b880664

Browse files
committed
Classify autobuild errors as configuration errors
1 parent 44534b7 commit b880664

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

lib/cli-errors.js

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/cli-errors.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/cli-errors.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ function ensureEndsInPeriod(text: string): string {
122122

123123
/** Error messages from the CLI that we consider configuration errors and handle specially. */
124124
export enum CliConfigErrorCategory {
125+
AutobuildError = "AutobuildError",
125126
ExternalRepositoryCloneFailed = "ExternalRepositoryCloneFailed",
126127
GradleBuildFailed = "GradleBuildFailed",
127128
IncompatibleWithActionVersion = "IncompatibleWithActionVersion",
@@ -156,6 +157,11 @@ export const cliErrorsConfig: Record<
156157
CliConfigErrorCategory,
157158
CliErrorConfiguration
158159
> = {
160+
[CliConfigErrorCategory.AutobuildError]: {
161+
cliErrorMessageCandidates: [
162+
new RegExp("We were unable to automatically build your code"),
163+
],
164+
},
159165
[CliConfigErrorCategory.ExternalRepositoryCloneFailed]: {
160166
cliErrorMessageCandidates: [
161167
new RegExp("Failed to clone external Git repository"),

0 commit comments

Comments
 (0)