Merge pull request #377 from github/fix-version-in-message

Fix the formatting of a warning message.
This commit is contained in:
Chris Gavin 2021-01-26 17:43:05 +00:00 committed by GitHub
commit 0dc37c7260
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

4
lib/util.js generated
View file

@ -222,10 +222,10 @@ function checkGitHubVersionInRange(version, mode, logger) {
const disallowedAPIVersionReason = apiVersionInRange(version.version, apiCompatibility.minimumVersion, apiCompatibility.maximumVersion); const disallowedAPIVersionReason = apiVersionInRange(version.version, apiCompatibility.minimumVersion, apiCompatibility.maximumVersion);
const toolName = mode === "actions" ? "Action" : "Runner"; const toolName = mode === "actions" ? "Action" : "Runner";
if (disallowedAPIVersionReason === DisallowedAPIVersionReason.ACTION_TOO_OLD) { if (disallowedAPIVersionReason === DisallowedAPIVersionReason.ACTION_TOO_OLD) {
logger.warning(`The CodeQL ${toolName} version you are using is too old to be compatible with GitHub Enterprise ${version}. If you experience issues, please upgrade to a more recent version of the CodeQL ${toolName}.`); logger.warning(`The CodeQL ${toolName} version you are using is too old to be compatible with GitHub Enterprise ${version.version}. If you experience issues, please upgrade to a more recent version of the CodeQL ${toolName}.`);
} }
if (disallowedAPIVersionReason === DisallowedAPIVersionReason.ACTION_TOO_NEW) { if (disallowedAPIVersionReason === DisallowedAPIVersionReason.ACTION_TOO_NEW) {
logger.warning(`GitHub Enterprise ${version} is too old to be compatible with this version of the CodeQL ${toolName}. If you experience issues, please upgrade to a more recent version of GitHub Enterprise or use an older version of the CodeQL ${toolName}.`); logger.warning(`GitHub Enterprise ${version.version} is too old to be compatible with this version of the CodeQL ${toolName}. If you experience issues, please upgrade to a more recent version of GitHub Enterprise or use an older version of the CodeQL ${toolName}.`);
} }
hasBeenWarnedAboutVersion = true; hasBeenWarnedAboutVersion = true;
if (mode === "actions") { if (mode === "actions") {

File diff suppressed because one or more lines are too long

View file

@ -267,14 +267,14 @@ export function checkGitHubVersionInRange(
disallowedAPIVersionReason === DisallowedAPIVersionReason.ACTION_TOO_OLD disallowedAPIVersionReason === DisallowedAPIVersionReason.ACTION_TOO_OLD
) { ) {
logger.warning( logger.warning(
`The CodeQL ${toolName} version you are using is too old to be compatible with GitHub Enterprise ${version}. If you experience issues, please upgrade to a more recent version of the CodeQL ${toolName}.` `The CodeQL ${toolName} version you are using is too old to be compatible with GitHub Enterprise ${version.version}. If you experience issues, please upgrade to a more recent version of the CodeQL ${toolName}.`
); );
} }
if ( if (
disallowedAPIVersionReason === DisallowedAPIVersionReason.ACTION_TOO_NEW disallowedAPIVersionReason === DisallowedAPIVersionReason.ACTION_TOO_NEW
) { ) {
logger.warning( logger.warning(
`GitHub Enterprise ${version} is too old to be compatible with this version of the CodeQL ${toolName}. If you experience issues, please upgrade to a more recent version of GitHub Enterprise or use an older version of the CodeQL ${toolName}.` `GitHub Enterprise ${version.version} is too old to be compatible with this version of the CodeQL ${toolName}. If you experience issues, please upgrade to a more recent version of GitHub Enterprise or use an older version of the CodeQL ${toolName}.`
); );
} }
hasBeenWarnedAboutVersion = true; hasBeenWarnedAboutVersion = true;