mirror of
https://github.com/github/codeql-action.git
synced 2026-01-03 21:20:09 +08:00
Move BuildMode to util.ts
This commit is contained in:
@@ -13,7 +13,6 @@ import {
|
||||
getCodeQL,
|
||||
} from "./codeql";
|
||||
import * as configUtils from "./config-utils";
|
||||
import { BuildMode } from "./config-utils";
|
||||
import { addDiagnostic, makeDiagnostic } from "./diagnostics";
|
||||
import { EnvVar } from "./environment";
|
||||
import { FeatureEnablement, Feature } from "./feature-flags";
|
||||
@@ -24,6 +23,7 @@ import { ToolsFeature } from "./tools-features";
|
||||
import { endTracingForCluster } from "./tracer-config";
|
||||
import { validateSarifFileSchema } from "./upload-lib";
|
||||
import * as util from "./util";
|
||||
import { BuildMode } from "./util";
|
||||
|
||||
export class CodeQLAnalysisError extends Error {
|
||||
queriesStatusReport: QueriesStatusReport;
|
||||
|
||||
@@ -4,14 +4,13 @@ import { getTemporaryDirectory, getWorkflowEventName } from "./actions-util";
|
||||
import { getGitHubVersion } from "./api-client";
|
||||
import { CodeQL, getCodeQL } from "./codeql";
|
||||
import * as configUtils from "./config-utils";
|
||||
import { BuildMode } from "./config-utils";
|
||||
import { EnvVar } from "./environment";
|
||||
import { Feature, featureConfig, Features } from "./feature-flags";
|
||||
import { isTracedLanguage, Language } from "./languages";
|
||||
import { Logger } from "./logging";
|
||||
import { parseRepositoryNwo } from "./repository";
|
||||
import { ToolsFeature } from "./tools-features";
|
||||
import { getRequiredEnvParam } from "./util";
|
||||
import { BuildMode, getRequiredEnvParam } from "./util";
|
||||
|
||||
export async function determineAutobuildLanguages(
|
||||
codeql: CodeQL,
|
||||
|
||||
@@ -14,7 +14,6 @@ import {
|
||||
setCodeQL,
|
||||
} from "./codeql";
|
||||
import * as configUtils from "./config-utils";
|
||||
import { BuildMode } from "./config-utils";
|
||||
import { Feature } from "./feature-flags";
|
||||
import { Language } from "./languages";
|
||||
import { getRunnerLogger } from "./logging";
|
||||
@@ -32,6 +31,7 @@ import {
|
||||
prettyPrintPack,
|
||||
ConfigurationError,
|
||||
withTmpDir,
|
||||
BuildMode,
|
||||
} from "./util";
|
||||
|
||||
setupTests(test);
|
||||
|
||||
@@ -17,6 +17,7 @@ import {
|
||||
GitHubVersion,
|
||||
prettyPrintPack,
|
||||
ConfigurationError,
|
||||
BuildMode,
|
||||
} from "./util";
|
||||
|
||||
// Property names from the user-supplied config file.
|
||||
@@ -73,12 +74,6 @@ interface IncludeQueryFilter {
|
||||
include: Record<string, string[] | string>;
|
||||
}
|
||||
|
||||
export enum BuildMode {
|
||||
None = "none",
|
||||
Autobuild = "autobuild",
|
||||
Manual = "manual",
|
||||
}
|
||||
|
||||
/**
|
||||
* Format of the parsed config file.
|
||||
*/
|
||||
|
||||
@@ -2,7 +2,6 @@ import test from "ava";
|
||||
import * as sinon from "sinon";
|
||||
|
||||
import * as actionsUtil from "./actions-util";
|
||||
import { BuildMode } from "./config-utils";
|
||||
import { EnvVar } from "./environment";
|
||||
import { Language } from "./languages";
|
||||
import { getRunnerLogger } from "./logging";
|
||||
@@ -12,7 +11,7 @@ import {
|
||||
setupActionsVars,
|
||||
createTestConfig,
|
||||
} from "./testing-utils";
|
||||
import { withTmpDir } from "./util";
|
||||
import { BuildMode, withTmpDir } from "./util";
|
||||
|
||||
setupTests(test);
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
getRequiredInput,
|
||||
} from "./actions-util";
|
||||
import { getAnalysisKey, getApiClient } from "./api-client";
|
||||
import { BuildMode, Config } from "./config-utils";
|
||||
import { type Config } from "./config-utils";
|
||||
import { EnvVar } from "./environment";
|
||||
import { Logger } from "./logging";
|
||||
import {
|
||||
@@ -24,6 +24,7 @@ import {
|
||||
GITHUB_DOTCOM_URL,
|
||||
DiskUsage,
|
||||
assertNever,
|
||||
BuildMode,
|
||||
} from "./util";
|
||||
|
||||
export enum ActionName {
|
||||
|
||||
15
src/util.ts
15
src/util.ts
@@ -1082,3 +1082,18 @@ export function checkActionVersion(
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Supported build modes.
|
||||
*
|
||||
* These specify whether the CodeQL database should be created by tracing a build, and if so, how
|
||||
* this build will be invoked.
|
||||
*/
|
||||
export enum BuildMode {
|
||||
/** The database will be created without building the source root. */
|
||||
None = "none",
|
||||
/** The database will be created by attempting to automatically build the source root. */
|
||||
Autobuild = "autobuild",
|
||||
/** The database will be created by building the source root using manually specified build steps. */
|
||||
Manual = "manual",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user