Revert "Add capability to filter queries #1098"
https://github.com/github/codeql-action/pull/1098 This reverts commit777b778409. This reverts commit59ca9b59cb. This reverts commiteec34d5f05. This reverts commit40b280032c.
This commit is contained in:
parent
47dc295f08
commit
99d4397d88
25 changed files with 96 additions and 767 deletions
13
lib/util.js
generated
13
lib/util.js
generated
|
|
@ -33,7 +33,6 @@ const api = __importStar(require("./api-client"));
|
|||
const api_client_1 = require("./api-client");
|
||||
const apiCompatibility = __importStar(require("./api-compatibility.json"));
|
||||
const codeql_1 = require("./codeql");
|
||||
const config_utils_1 = require("./config-utils");
|
||||
/**
|
||||
* Specifies bundle versions that are known to be broken
|
||||
* and will not be used if found in the toolcache.
|
||||
|
|
@ -563,10 +562,7 @@ async function getMlPoweredJsQueriesPack(codeQL) {
|
|||
else {
|
||||
version = `~0.1.0`;
|
||||
}
|
||||
return (0, config_utils_1.prettyPrintPack)({
|
||||
name: exports.ML_POWERED_JS_QUERIES_PACK_NAME,
|
||||
version,
|
||||
});
|
||||
return `${exports.ML_POWERED_JS_QUERIES_PACK_NAME}@${version}`;
|
||||
}
|
||||
exports.getMlPoweredJsQueriesPack = getMlPoweredJsQueriesPack;
|
||||
/**
|
||||
|
|
@ -592,8 +588,9 @@ exports.getMlPoweredJsQueriesPack = getMlPoweredJsQueriesPack;
|
|||
*/
|
||||
function getMlPoweredJsQueriesStatus(config) {
|
||||
const mlPoweredJsQueryPacks = (config.packs.javascript || [])
|
||||
.map((p) => (0, config_utils_1.parsePacksSpecification)(p))
|
||||
.filter((pack) => pack.name === "codeql/javascript-experimental-atm-queries" && !pack.path);
|
||||
.map((pack) => pack.split("@"))
|
||||
.filter((packNameVersion) => packNameVersion[0] === "codeql/javascript-experimental-atm-queries" &&
|
||||
packNameVersion.length <= 2);
|
||||
switch (mlPoweredJsQueryPacks.length) {
|
||||
case 1:
|
||||
// We should always specify an explicit version string in `getMlPoweredJsQueriesPack`,
|
||||
|
|
@ -601,7 +598,7 @@ function getMlPoweredJsQueriesStatus(config) {
|
|||
// with each version of the CodeQL Action. Therefore in practice we should only hit the
|
||||
// `latest` case here when customers have explicitly added the ML-powered query pack to their
|
||||
// CodeQL config.
|
||||
return mlPoweredJsQueryPacks[0].version || "latest";
|
||||
return mlPoweredJsQueryPacks[0][1] || "latest";
|
||||
case 0:
|
||||
return "false";
|
||||
default:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue