Deprecate Go extraction reconciliation feature flag and CODEQL_EXTRACTOR_GO_BUILD_TRACING for custom builds (#1322)

Co-authored-by: Henry Mercer <henry.mercer@me.com>
This commit is contained in:
Angela P Wen 2022-11-14 13:54:35 -08:00 committed by GitHub
parent 0eacdb53ad
commit 5883c13406
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
52 changed files with 178 additions and 610 deletions

View file

@ -1,23 +1,18 @@
import { getCodeQL } from "./codeql";
import * as configUtils from "./config-utils";
import { FeatureEnablement } from "./feature-flags";
import { Language, isTracedLanguage } from "./languages";
import { Logger } from "./logging";
import * as util from "./util";
export async function determineAutobuildLanguages(
config: configUtils.Config,
featureEnablement: FeatureEnablement,
logger: Logger
): Promise<Language[] | undefined> {
const isGoExtractionReconciliationEnabled =
await util.isGoExtractionReconciliationEnabled(featureEnablement);
// Attempt to find a language to autobuild
// We want pick the dominant language in the repo from the ones we're able to build
// The languages are sorted in order specified by user or by lines of code if we got
// them from the GitHub API, so try to build the first language on the list.
const autobuildLanguages = config.languages.filter((l) =>
isTracedLanguage(l, isGoExtractionReconciliationEnabled, logger)
isTracedLanguage(l)
);
if (!autobuildLanguages) {