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

@ -1,3 +1,4 @@
import { DocUrl } from "./doc-url";
import { ConfigurationError } from "./util";
/**
@ -27,11 +28,9 @@ export class CommandInvocationError extends Error {
fatalErrors.trim(),
)} See the logs for more details.`;
} else if (autobuildErrors) {
const autobuildHelpLink =
"https://docs.github.com/en/code-security/code-scanning/troubleshooting-code-scanning/automatic-build-failed";
message =
"We were unable to automatically build your code. Please provide manual build steps. " +
`See ${autobuildHelpLink} for more information. ` +
`See ${DocUrl.AUTOMATIC_BUILD_FAILED} for more information. ` +
`Encountered the following error: ${autobuildErrors}`;
} else {
const lastLine = ensureEndsInPeriod(