Skip to content

Commit bddfc7c

Browse files
committed
Add config error for Gradle build failures
1 parent 3edd1bf commit bddfc7c

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
@@ -124,6 +124,7 @@ function ensureEndsInPeriod(text: string): string {
124124

125125
/** Error messages from the CLI that we consider configuration errors and handle specially. */
126126
export enum CliConfigErrorCategory {
127+
GradleBuildFailed = "GradleBuildFailed",
127128
IncompatibleWithActionVersion = "IncompatibleWithActionVersion",
128129
InitCalledTwice = "InitCalledTwice",
129130
InvalidSourceRoot = "InvalidSourceRoot",
@@ -150,6 +151,11 @@ export const cliErrorsConfig: Record<
150151
CliConfigErrorCategory,
151152
CliErrorConfiguration
152153
> = {
154+
[CliConfigErrorCategory.GradleBuildFailed]: {
155+
cliErrorMessageCandidates: [
156+
new RegExp("[autobuild] FAILURE: Build failed with an exception."),
157+
],
158+
},
153159
// Version of CodeQL CLI is incompatible with this version of the CodeQL Action
154160
[CliConfigErrorCategory.IncompatibleWithActionVersion]: {
155161
cliErrorMessageCandidates: [

0 commit comments

Comments
 (0)