mirror of
https://github.com/github/codeql-action.git
synced 2025-12-24 08:10:06 +08:00
Send the external repository token to the CLI
This commit does a few related things: 1. Bumps the minimum version for cli config parsing to 2.10.6 2. Ensures that if cli config parsing is enabled, then remove repos are _not_ downloaded by the action. It happens in the CLI. 3. Passes the `--external-repository-token-stdin` option to the CLI and passes the appropriate token via stdin if cli config parsing is enabled.
This commit is contained in:
@@ -15,7 +15,7 @@ import { GitHubApiDetails } from "./api-client";
|
||||
import * as codeql from "./codeql";
|
||||
import { AugmentationProperties, Config } from "./config-utils";
|
||||
import * as defaults from "./defaults.json";
|
||||
import { Feature } from "./feature-flags";
|
||||
import { Feature, featureConfig } from "./feature-flags";
|
||||
import { Language } from "./languages";
|
||||
import { getRunnerLogger } from "./logging";
|
||||
import { setupTests, setupActionsVars, createFeatures } from "./testing-utils";
|
||||
@@ -513,7 +513,7 @@ const injectedConfigMacro = test.macro({
|
||||
const codeqlObject = await codeql.getCodeQLForTesting();
|
||||
sinon
|
||||
.stub(codeqlObject, "getVersion")
|
||||
.resolves(codeql.CODEQL_VERSION_CONFIG_FILES);
|
||||
.resolves(featureConfig[Feature.CliConfigFileEnabled].minimumVersion);
|
||||
|
||||
const thisStubConfig: Config = {
|
||||
...stubConfig,
|
||||
@@ -570,7 +570,7 @@ test(
|
||||
},
|
||||
{},
|
||||
{
|
||||
packs: ["codeql/javascript-experimental-atm-queries@~0.3.0"],
|
||||
packs: ["codeql/javascript-experimental-atm-queries@~0.4.0"],
|
||||
}
|
||||
);
|
||||
|
||||
@@ -591,7 +591,7 @@ test(
|
||||
packs: {
|
||||
javascript: [
|
||||
"codeql/something-else",
|
||||
"codeql/javascript-experimental-atm-queries@~0.3.0",
|
||||
"codeql/javascript-experimental-atm-queries@~0.4.0",
|
||||
],
|
||||
},
|
||||
}
|
||||
@@ -613,7 +613,7 @@ test(
|
||||
{
|
||||
packs: {
|
||||
cpp: ["codeql/something-else"],
|
||||
javascript: ["codeql/javascript-experimental-atm-queries@~0.3.0"],
|
||||
javascript: ["codeql/javascript-experimental-atm-queries@~0.4.0"],
|
||||
},
|
||||
}
|
||||
);
|
||||
@@ -694,7 +694,7 @@ test(
|
||||
},
|
||||
},
|
||||
{
|
||||
packs: ["xxx", "yyy", "codeql/javascript-experimental-atm-queries@~0.3.0"],
|
||||
packs: ["xxx", "yyy", "codeql/javascript-experimental-atm-queries@~0.4.0"],
|
||||
}
|
||||
);
|
||||
|
||||
@@ -826,7 +826,7 @@ test("does not use injected config", async (t: ExecutionContext<unknown>) => {
|
||||
const codeqlObject = await codeql.getCodeQLForTesting();
|
||||
sinon
|
||||
.stub(codeqlObject, "getVersion")
|
||||
.resolves(codeql.CODEQL_VERSION_CONFIG_FILES);
|
||||
.resolves(featureConfig[Feature.CliConfigFileEnabled].minimumVersion);
|
||||
|
||||
await codeqlObject.databaseInitCluster(
|
||||
stubConfig,
|
||||
|
||||
Reference in New Issue
Block a user