mirror of
https://github.com/github/codeql-action.git
synced 2026-10-21 10:11:28 +00:00
Include URL to announcement in diagnostic and log messages
This commit is contained in:
13
lib/entry-points.js
generated
13
lib/entry-points.js
generated
@@ -186255,7 +186255,10 @@ function handleUnsupportedVersion(logger2, config, skipUnsupportedTracedAnalysis
|
||||
languages: config.languages,
|
||||
[attributeName]: version.toString()
|
||||
},
|
||||
markdownMessage: baseMessage,
|
||||
markdownMessage: [
|
||||
baseMessage,
|
||||
`For more information, see [this announcement](${"https://github.blog/changelog/2026-10-19-codeql-changes-for-macos-27-xcode-27-and-swift-6-4/" /* UNSUPPORTED_TRACED_ANALYSIS_MACOS27 */}).`
|
||||
].join(" "),
|
||||
severity: skipUnsupportedTracedAnalysis ? "error" : "warning",
|
||||
visibility: {
|
||||
cliSummaryTable: true,
|
||||
@@ -186266,10 +186269,14 @@ function handleUnsupportedVersion(logger2, config, skipUnsupportedTracedAnalysis
|
||||
)
|
||||
);
|
||||
}
|
||||
const logMessage = [
|
||||
baseMessage,
|
||||
`For more information, see ${"https://github.blog/changelog/2026-10-19-codeql-changes-for-macos-27-xcode-27-and-swift-6-4/" /* UNSUPPORTED_TRACED_ANALYSIS_MACOS27 */}`
|
||||
].join(" ");
|
||||
if (skipUnsupportedTracedAnalysis) {
|
||||
throw new ConfigurationError(baseMessage);
|
||||
throw new ConfigurationError(logMessage);
|
||||
} else {
|
||||
logger2.warning(baseMessage);
|
||||
logger2.warning(logMessage);
|
||||
}
|
||||
}
|
||||
async function hasTracedLanguages(config, codeql) {
|
||||
|
||||
@@ -13,4 +13,6 @@ export enum DocUrl {
|
||||
SPECIFY_BUILD_STEPS_MANUALLY = "https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages#about-specifying-build-steps-manually",
|
||||
SYSTEM_REQUIREMENTS = "https://codeql.github.com/docs/codeql-overview/system-requirements/",
|
||||
TRACK_CODE_SCANNING_ALERTS_ACROSS_RUNS = "https://docs.github.com/en/code-security/reference/code-scanning/sarif-support-for-code-scanning#data-for-preventing-duplicated-alerts",
|
||||
/** Blog post about traced analysis being unsupported on macOS 27 and with Xcode 27. */
|
||||
UNSUPPORTED_TRACED_ANALYSIS_MACOS27 = "https://github.blog/changelog/2026-10-19-codeql-changes-for-macos-27-xcode-27-and-swift-6-4/",
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import type { ActionState, Logger } from "../action-common";
|
||||
import type { CodeQL } from "../codeql";
|
||||
import type { ActionConfig } from "../config/action-config";
|
||||
import { addDiagnostic, makeDiagnostic } from "../diagnostics";
|
||||
import { DocUrl } from "../doc-url";
|
||||
import { Feature } from "../feature-flags";
|
||||
import { macOSVersion, xcodeVersion } from "../platform";
|
||||
import { ConfigurationError } from "../util";
|
||||
@@ -55,7 +56,10 @@ function handleUnsupportedVersion(
|
||||
languages: config.languages,
|
||||
[attributeName]: version.toString(),
|
||||
},
|
||||
markdownMessage: baseMessage,
|
||||
markdownMessage: [
|
||||
baseMessage,
|
||||
`For more information, see [this announcement](${DocUrl.UNSUPPORTED_TRACED_ANALYSIS_MACOS27}).`,
|
||||
].join(" "),
|
||||
severity: skipUnsupportedTracedAnalysis ? "error" : "warning",
|
||||
visibility: {
|
||||
cliSummaryTable: true,
|
||||
@@ -67,14 +71,20 @@ function handleUnsupportedVersion(
|
||||
);
|
||||
}
|
||||
|
||||
// Log messages generally don't render as markdown, so we include the URL verbatim there.
|
||||
const logMessage = [
|
||||
baseMessage,
|
||||
`For more information, see ${DocUrl.UNSUPPORTED_TRACED_ANALYSIS_MACOS27}`,
|
||||
].join(" ");
|
||||
|
||||
// Throw an error to abort the analysis if the FF is enabled or log the message.
|
||||
if (skipUnsupportedTracedAnalysis) {
|
||||
// ConfigurationErrors are converted to the "aborted" status by the exception handler
|
||||
// in `init-action.ts` that guards the call to `checkRunnerSupportsTracedAnalysis`.
|
||||
throw new ConfigurationError(baseMessage);
|
||||
throw new ConfigurationError(logMessage);
|
||||
} else {
|
||||
// This will also show up as a workflow annotation.
|
||||
logger.warning(baseMessage);
|
||||
logger.warning(logMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user