mirror of
https://github.com/github/codeql-action.git
synced 2025-12-23 15:50:11 +08:00
Tweak a couple of log messages
This commit is contained in:
5
lib/setup-codeql.js
generated
5
lib/setup-codeql.js
generated
@@ -219,10 +219,9 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian
|
||||
*/
|
||||
const forceShippedTools = toolsInput && CODEQL_BUNDLE_VERSION_ALIAS.includes(toolsInput);
|
||||
if (forceShippedTools) {
|
||||
logger.info(`Overriding the version of the CodeQL tools by ${defaultCliVersion.cliVersion}, the version shipped with the Action since ` +
|
||||
`tools: ${toolsInput} was requested.`);
|
||||
logger.info(`'tools: ${toolsInput}' was requested, so using CodeQL version ${defaultCliVersion.cliVersion}, the version shipped with the Action.`);
|
||||
if (toolsInput === "latest") {
|
||||
logger.warning("`tools: latest` has been renamed to `tools: linked`, but the old name is still supported for now. No action is required.");
|
||||
logger.warning("`tools: latest` has been renamed to `tools: linked`, but the old name is still supported. No action is required.");
|
||||
}
|
||||
}
|
||||
/** CLI version number, for example 2.12.6. */
|
||||
|
||||
File diff suppressed because one or more lines are too long
2
lib/setup-codeql.test.js
generated
2
lib/setup-codeql.test.js
generated
@@ -103,7 +103,7 @@ ava_1.default.beforeEach(() => {
|
||||
t.is(source.toolsVersion, testing_utils_1.LINKED_CLI_VERSION.cliVersion);
|
||||
t.is(source.sourceType, "download");
|
||||
// Afterwards, ensure that we see the deprecation message in the log.
|
||||
const expected_message = "`tools: latest` has been renamed to `tools: linked`, but the old name is still supported for now. No action is required.";
|
||||
const expected_message = "`tools: latest` has been renamed to `tools: linked`, but the old name is still supported. No action is required.";
|
||||
t.assert(loggedMessages.some((msg) => typeof msg.message === "string" &&
|
||||
msg.message.includes(expected_message)));
|
||||
});
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -141,7 +141,7 @@ test("getCodeQLSource correctly returns bundled CLI version when tools == latest
|
||||
|
||||
// Afterwards, ensure that we see the deprecation message in the log.
|
||||
const expected_message: string =
|
||||
"`tools: latest` has been renamed to `tools: linked`, but the old name is still supported for now. No action is required.";
|
||||
"`tools: latest` has been renamed to `tools: linked`, but the old name is still supported. No action is required.";
|
||||
t.assert(
|
||||
loggedMessages.some(
|
||||
(msg) =>
|
||||
|
||||
@@ -274,13 +274,12 @@ export async function getCodeQLSource(
|
||||
toolsInput && CODEQL_BUNDLE_VERSION_ALIAS.includes(toolsInput);
|
||||
if (forceShippedTools) {
|
||||
logger.info(
|
||||
`Overriding the version of the CodeQL tools by ${defaultCliVersion.cliVersion}, the version shipped with the Action since ` +
|
||||
`tools: ${toolsInput} was requested.`,
|
||||
`'tools: ${toolsInput}' was requested, so using CodeQL version ${defaultCliVersion.cliVersion}, the version shipped with the Action.`,
|
||||
);
|
||||
|
||||
if (toolsInput === "latest") {
|
||||
logger.warning(
|
||||
"`tools: latest` has been renamed to `tools: linked`, but the old name is still supported for now. No action is required.",
|
||||
"`tools: latest` has been renamed to `tools: linked`, but the old name is still supported. No action is required.",
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user