Refactor all doc URLs into their own enum

This commit is contained in:
Angela P Wen
2024-07-23 14:13:16 +02:00
parent 7cb4b5a421
commit 7ad1090882
18 changed files with 67 additions and 25 deletions

View File

@@ -17,6 +17,7 @@ import {
wrapCliConfigurationError,
} from "./cli-errors";
import { type Config } from "./config-utils";
import { DocUrl } from "./doc-url";
import { EnvVar } from "./environment";
import {
CODEQL_VERSION_FINE_GRAINED_PARALLELISM,
@@ -698,9 +699,7 @@ export async function getCodeQLForCmd(
const prefix =
"We were unable to automatically build your code. " +
"Please change the build mode for this language to manual and specify build steps " +
"for your project. See " +
"https://docs.github.com/en/code-security/code-scanning/troubleshooting-code-scanning/automatic-build-failed" +
"for more information.";
`for your project. See ${DocUrl.AUTOMATIC_BUILD_FAILED} for more information.`;
const ErrorConstructor =
e instanceof util.ConfigurationError
? util.ConfigurationError