mirror of
https://github.com/github/codeql-action.git
synced 2025-12-30 19:20:08 +08:00
Merge branch 'main' into update-bundle/codeql-bundle-v2.17.1
This commit is contained in:
@@ -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."),
|
||||
|
||||
@@ -42,7 +42,6 @@ test("validate correct payload used for push, PR merge commit, and PR head", asy
|
||||
undefined,
|
||||
["CodeQL", "eslint"],
|
||||
"mergeBaseCommit",
|
||||
getRunnerLogger(true),
|
||||
);
|
||||
// Not triggered by a pull request
|
||||
t.falsy(pushPayload.base_ref);
|
||||
@@ -66,7 +65,6 @@ test("validate correct payload used for push, PR merge commit, and PR head", asy
|
||||
undefined,
|
||||
["CodeQL", "eslint"],
|
||||
"mergeBaseCommit",
|
||||
getRunnerLogger(true),
|
||||
);
|
||||
// Uploads for a merge commit use the merge base
|
||||
t.deepEqual(prMergePayload.base_ref, "refs/heads/master");
|
||||
@@ -84,7 +82,6 @@ test("validate correct payload used for push, PR merge commit, and PR head", asy
|
||||
undefined,
|
||||
["CodeQL", "eslint"],
|
||||
"mergeBaseCommit",
|
||||
getRunnerLogger(true),
|
||||
);
|
||||
// Uploads for the head use the PR base
|
||||
t.deepEqual(prHeadPayload.base_ref, "refs/heads/master");
|
||||
|
||||
@@ -421,9 +421,7 @@ export function buildPayload(
|
||||
environment: string | undefined,
|
||||
toolNames: string[],
|
||||
mergeBaseCommitOid: string | undefined,
|
||||
logger: Logger,
|
||||
) {
|
||||
logger.info(`Combining SARIF files using CLI`);
|
||||
const payloadObj = {
|
||||
commit_oid: commitOid,
|
||||
ref,
|
||||
@@ -537,7 +535,6 @@ async function uploadFiles(
|
||||
environment,
|
||||
toolNames,
|
||||
await actionsUtil.determineMergeBaseCommitOid(),
|
||||
logger,
|
||||
);
|
||||
|
||||
// Log some useful debug info about the info
|
||||
|
||||
Reference in New Issue
Block a user