Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into dbartol/use-real-acti…
Browse files Browse the repository at this point in the history
…ons-extractor
  • Loading branch information
dbartol committed Mar 3, 2025
2 parents 85e30fe + 4b35b04 commit d37931a
Showing 8 changed files with 24 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/post-release-mergeback.yml
Original file line number Diff line number Diff line change
@@ -168,7 +168,7 @@ jobs:
--draft
- name: Generate token
uses: actions/create-github-app-token@v1.11.5
uses: actions/create-github-app-token@v1.11.6
id: app-token
with:
app-id: ${{ vars.AUTOMATION_APP_ID }}
2 changes: 1 addition & 1 deletion .github/workflows/update-release-branch.yml
Original file line number Diff line number Diff line change
@@ -124,7 +124,7 @@ jobs:
pull-requests: write # needed to create pull request
steps:
- name: Generate token
uses: actions/create-github-app-token@v1.11.5
uses: actions/create-github-app-token@v1.11.6
id: app-token
with:
app-id: ${{ vars.AUTOMATION_APP_ID }}
4 changes: 4 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: 5 additions & 1 deletion lib/codeql.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/codeql.js.map

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions src/cli-errors.ts
Original file line number Diff line number Diff line change
@@ -119,6 +119,7 @@ function extractAutobuildErrors(error: string): string | undefined {
/** Error messages from the CLI that we consider configuration errors and handle specially. */
export enum CliConfigErrorCategory {
AutobuildError = "AutobuildError",
CouldNotCreateTempDir = "CouldNotCreateTempDir",
ExternalRepositoryCloneFailed = "ExternalRepositoryCloneFailed",
GradleBuildFailed = "GradleBuildFailed",
IncompatibleWithActionVersion = "IncompatibleWithActionVersion",
@@ -159,6 +160,9 @@ export const cliErrorsConfig: Record<
new RegExp("We were unable to automatically build your code"),
],
},
[CliConfigErrorCategory.CouldNotCreateTempDir]: {
cliErrorMessageCandidates: [new RegExp("Could not create temp directory")],
},
[CliConfigErrorCategory.ExternalRepositoryCloneFailed]: {
cliErrorMessageCandidates: [
new RegExp("Failed to clone external Git repository"),
8 changes: 7 additions & 1 deletion src/codeql.ts
Original file line number Diff line number Diff line change
@@ -377,7 +377,13 @@ export async function setupCodeQL(
zstdAvailability,
};
} catch (e) {
throw new Error(
const ErrorClass =
e instanceof util.ConfigurationError ||
(e instanceof Error && e.message.includes("ENOSPC")) // out of disk space
? util.ConfigurationError
: Error;

throw new ErrorClass(
`Unable to download and extract CodeQL CLI: ${getErrorMessage(e)}${
e instanceof Error && e.stack ? `\n\nDetails: ${e.stack}` : ""
}`,

0 comments on commit d37931a

Please sign in to comment.