Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
37bdbde
Update changelog and version after v4.37.6
github-actions[bot] Aug 4, 2026
7d82f11
Rebuild
github-actions[bot] Aug 4, 2026
fad141f
Merge pull request #4073 from github/mergeback/v4.37.6-to-main-5595ccaf
mbg Aug 4, 2026
76c4439
Bump brace-expansion from 1.1.16 to 1.1.18
dependabot[bot] Aug 4, 2026
c5995f5
Rebuild
github-actions[bot] Aug 4, 2026
6a90bf1
Merge pull request #4075 from github/dependabot/npm_and_yarn/brace-ex…
mbg Aug 4, 2026
47a0a83
Bump globals in the npm-minor group across 1 directory
dependabot[bot] Aug 5, 2026
74cfae9
Bump actions/setup-java
dependabot[bot] Aug 5, 2026
bdf3971
Rebuild
github-actions[bot] Aug 5, 2026
8ebf109
Merge pull request #4077 from github/dependabot/github_actions/dot-gi…
henrymercer Aug 6, 2026
7d9249f
Merge pull request #4076 from github/dependabot/npm_and_yarn/npm-mino…
henrymercer Aug 6, 2026
acb3856
Bump js-yaml from 5.2.2 to 5.2.3
dependabot[bot] Aug 10, 2026
b5225f2
Rebuild
github-actions[bot] Aug 10, 2026
7131139
Trigger workflows
mbg Aug 11, 2026
b672c70
Merge pull request #4082 from github/dependabot/npm_and_yarn/js-yaml-…
mbg Aug 11, 2026
c205ff6
Promote `OverlayAnalysisResourceChecksV2`
mbg Aug 11, 2026
f47bb7b
Remove `v2` from test title
mbg Aug 11, 2026
c16c0f3
Merge pull request #4083 from github/mbg/features/remove-overlayResou…
mbg Aug 11, 2026
54a0846
Bump undici from ^6.24.0 to ^6.28.0
navntoft Aug 12, 2026
0e8a5d9
Update default bundle to codeql-bundle-v2.26.3
github-actions[bot] Aug 12, 2026
ca1c972
Add changelog note
github-actions[bot] Aug 12, 2026
6f0220e
Merge pull request #4084 from github/navntoft/bump-undici
mbg Aug 12, 2026
dc1b98a
Make `logger` available to `getCodeQLForCmd`
mbg Aug 12, 2026
1f87aed
Merge pull request #4085 from github/update-bundle/codeql-bundle-v2.26.3
mbg Aug 12, 2026
38055a3
Drop `logger` from `databaseInitCluster` in interface
mbg Aug 12, 2026
ab5db25
Bump the npm-minor group across 1 directory with 8 updates
dependabot[bot] Aug 12, 2026
b4d8a54
Rebuild
github-actions[bot] Aug 12, 2026
9310334
Merge pull request #4086 from github/mbg/thread-action-state-to-codeql
mbg Aug 13, 2026
be7a3db
Merge pull request #4087 from github/dependabot/npm_and_yarn/npm-mino…
mbg Aug 13, 2026
951a133
Update changelog for v4.37.7
github-actions[bot] Aug 13, 2026
ff2f1c6
Merge pull request #4093 from github/update-v4.37.7-be7a3dbb8
mbg Aug 13, 2026
8b2ec47
Revert "Update version and changelog for v3.37.6"
github-actions[bot] Aug 13, 2026
4da5eae
Revert "Rebuild"
github-actions[bot] Aug 13, 2026
272e6d3
Merge remote-tracking branch 'origin/releases/v4' into backport-v3.37…
github-actions[bot] Aug 13, 2026
5f47b57
Update version and changelog for v3.37.7
github-actions[bot] Aug 13, 2026
2a073c8
Rebuild
github-actions[bot] Aug 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Make logger available to getCodeQLForCmd
  • Loading branch information
mbg committed Aug 12, 2026
commit dc1b98ad1c2f13ccf9fc33fb82f32fc76f944253
30 changes: 16 additions & 14 deletions lib/entry-points.js

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

2 changes: 1 addition & 1 deletion src/analyze-action-post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export async function runWrapper() {
logger,
);
if (config !== undefined) {
const codeql = await getCodeQL(config.codeQLCmd);
const codeql = await getCodeQL(logger, config.codeQLCmd);
const version = await codeql.getVersion();
await debugArtifacts.uploadCombinedSarifArtifacts(
logger,
Expand Down
2 changes: 1 addition & 1 deletion src/analyze-action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ async function run({ startedAt, logger }: ActionState<["Base", "Logger"]>) {
);
}

const codeql = await getCodeQL(config.codeQLCmd);
const codeql = await getCodeQL(logger, config.codeQLCmd);

if (hasBadExpectErrorInput()) {
throw new util.ConfigurationError(
Expand Down
2 changes: 1 addition & 1 deletion src/autobuild-action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ async function run({ startedAt, logger }: ActionState<["Base", "Logger"]>) {
);
}

const codeql = await getCodeQL(config.codeQLCmd);
const codeql = await getCodeQL(logger, config.codeQLCmd);

languages = await determineAutobuildLanguages(codeql, config, logger);
if (languages !== undefined) {
Expand Down
2 changes: 1 addition & 1 deletion src/autobuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export async function runAutobuild(
logger: Logger,
) {
logger.startGroup(`Attempting to automatically build ${language} code`);
const codeQL = await getCodeQL(config.codeQLCmd);
const codeQL = await getCodeQL(logger, config.codeQLCmd);
if (language === BuiltInLanguage.cpp) {
await setupCppAutobuild(codeQL, logger);
}
Expand Down
13 changes: 7 additions & 6 deletions src/codeql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {
} from "./feature-flags";
import { isAnalyzingDefaultBranch } from "./git-utils";
import { Language } from "./languages";
import { Logger } from "./logging";
import { getRunnerLogger, Logger } from "./logging";
import { writeBaseDatabaseOidsFile, writeOverlayChangesFile } from "./overlay";
import { OverlayDatabaseMode } from "./overlay/overlay-database-mode";
import * as setupCodeql from "./setup-codeql";
Expand Down Expand Up @@ -346,7 +346,7 @@ export async function setupCodeQL(
);
}

cachedCodeQL = await getCodeQLForCmd(codeqlCmd, checkVersion);
cachedCodeQL = await getCodeQLForCmd(logger, codeqlCmd, checkVersion);
return {
codeql: cachedCodeQL,
toolsDownloadStatusReport,
Expand All @@ -372,9 +372,9 @@ export async function setupCodeQL(
/**
* Use the CodeQL executable located at the given path.
*/
export async function getCodeQL(cmd: string): Promise<CodeQL> {
export async function getCodeQL(logger: Logger, cmd: string): Promise<CodeQL> {
if (cachedCodeQL === undefined) {
cachedCodeQL = await getCodeQLForCmd(cmd, true);
cachedCodeQL = await getCodeQLForCmd(logger, cmd, true);
}
return cachedCodeQL;
}
Expand Down Expand Up @@ -481,8 +481,9 @@ export function createStubCodeQL(partialCodeql: Partial<CodeQL>): CodeQL {
*/
export async function getCodeQLForTesting(
cmd = "codeql-for-testing",
logger: Logger = getRunnerLogger(true),
): Promise<CodeQL> {
return getCodeQLForCmd(cmd, false);
return getCodeQLForCmd(logger, cmd, false);
}

/**
Expand All @@ -494,6 +495,7 @@ export async function getCodeQLForTesting(
* @returns A new CodeQL object
*/
async function getCodeQLForCmd(
logger: Logger,
cmd: string,
checkVersion: boolean,
): Promise<CodeQL> {
Expand Down Expand Up @@ -539,7 +541,6 @@ async function getCodeQLForCmd(
sourceRoot: string,
processName: string | undefined,
qlconfigFile: string | undefined,
logger: Logger,
) {
const extraArgs = config.languages.map(
(language) => `--language=${language}`,
Expand Down
5 changes: 4 additions & 1 deletion src/init-action-post-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ async function prepareFailedSarif(
const category = `/language:${language}`;
const checkoutPath = ".";
const result = await generateFailedSarif(
logger,
features,
config,
category,
Expand All @@ -146,6 +147,7 @@ async function prepareFailedSarif(
const checkoutPath = getCheckoutPathInputOrThrow(workflow, jobName, matrix);

const result = await generateFailedSarif(
logger,
features,
config,
category,
Expand All @@ -156,14 +158,15 @@ async function prepareFailedSarif(
}

async function generateFailedSarif(
logger: Logger,
features: FeatureEnablement,
config: Config,
category: string | undefined,
checkoutPath: string,
sarifFile?: string,
) {
const databasePath = config.dbLocation;
const codeql = await getCodeQL(config.codeQLCmd);
const codeql = await getCodeQL(logger, config.codeQLCmd);

// Set the filename for the SARIF file if not already set.
if (sarifFile === undefined) {
Expand Down
2 changes: 1 addition & 1 deletion src/init-action-post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ async function run(startedAt: Date) {
"Debugging artifacts are unavailable since the 'init' Action failed before it could produce any.",
);
} else {
const codeql = await getCodeQL(config.codeQLCmd);
const codeql = await getCodeQL(logger, config.codeQLCmd);

uploadFailedSarifResult = await initActionPostHelper.uploadFailureInfo(
debugArtifacts.tryUploadAllAvailableDebugArtifacts,
Expand Down
2 changes: 1 addition & 1 deletion src/resolve-environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export async function runResolveBuildEnvironment(
) {
logger.startGroup(`Attempting to resolve build environment for ${language}`);

const codeql = await getCodeQL(cmd);
const codeql = await getCodeQL(logger, cmd);

if (workingDir !== undefined) {
logger.info(`Using ${workingDir} as the working directory.`);
Expand Down
2 changes: 1 addition & 1 deletion src/upload-lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ async function combineSarifFilesUsingCLI(

const config = await getConfig(tempDir, logger);
if (config !== undefined) {
codeQL = await getCodeQL(config.codeQLCmd);
codeQL = await getCodeQL(logger, config.codeQLCmd);
tempDir = config.tempDir;
} else {
logger.info(
Expand Down
Loading