mirror of
https://github.com/github/codeql-action.git
synced 2026-10-30 01:27:22 +00:00
Add diagnostic when overlay disabled by repo property
This commit is contained in:
32
lib/init-action.js
generated
32
lib/init-action.js
generated
@@ -106249,6 +106249,7 @@ async function getOverlayDatabaseMode(codeql, features, languages, sourceRoot, b
|
||||
let overlayDatabaseMode = "none" /* None */;
|
||||
let useOverlayDatabaseCaching = false;
|
||||
let skippedDueToCachedStatus = false;
|
||||
let disabledByRepositoryProperty = false;
|
||||
const modeEnv = process.env.CODEQL_OVERLAY_DATABASE_MODE;
|
||||
if (modeEnv === "overlay" /* Overlay */ || modeEnv === "overlay-base" /* OverlayBase */ || modeEnv === "none" /* None */) {
|
||||
overlayDatabaseMode = modeEnv;
|
||||
@@ -106260,6 +106261,7 @@ async function getOverlayDatabaseMode(codeql, features, languages, sourceRoot, b
|
||||
`Setting overlay database mode to ${"none" /* None */} because the ${"github-codeql-disable-overlay" /* DISABLE_OVERLAY */} repository property is set to true.`
|
||||
);
|
||||
overlayDatabaseMode = "none" /* None */;
|
||||
disabledByRepositoryProperty = true;
|
||||
} else if (await isOverlayAnalysisFeatureEnabled(
|
||||
features,
|
||||
codeql,
|
||||
@@ -106312,7 +106314,8 @@ async function getOverlayDatabaseMode(codeql, features, languages, sourceRoot, b
|
||||
const nonOverlayAnalysis = {
|
||||
overlayDatabaseMode: "none" /* None */,
|
||||
useOverlayDatabaseCaching: false,
|
||||
skippedDueToCachedStatus
|
||||
skippedDueToCachedStatus,
|
||||
disabledByRepositoryProperty
|
||||
};
|
||||
if (overlayDatabaseMode === "none" /* None */) {
|
||||
return nonOverlayAnalysis;
|
||||
@@ -106358,7 +106361,8 @@ async function getOverlayDatabaseMode(codeql, features, languages, sourceRoot, b
|
||||
return {
|
||||
overlayDatabaseMode,
|
||||
useOverlayDatabaseCaching,
|
||||
skippedDueToCachedStatus
|
||||
skippedDueToCachedStatus,
|
||||
disabledByRepositoryProperty
|
||||
};
|
||||
}
|
||||
function dbLocationOrDefault(dbLocation, tempDir) {
|
||||
@@ -106450,7 +106454,8 @@ async function initConfig(features, inputs) {
|
||||
const {
|
||||
overlayDatabaseMode,
|
||||
useOverlayDatabaseCaching,
|
||||
skippedDueToCachedStatus: overlaySkippedDueToCachedStatus
|
||||
skippedDueToCachedStatus: overlaySkippedDueToCachedStatus,
|
||||
disabledByRepositoryProperty: overlayDisabledByRepositoryProperty
|
||||
} = await getOverlayDatabaseMode(
|
||||
inputs.codeql,
|
||||
inputs.features,
|
||||
@@ -106491,6 +106496,27 @@ Improved incremental analysis will be automatically retried when the next versio
|
||||
)
|
||||
);
|
||||
}
|
||||
if (overlayDisabledByRepositoryProperty) {
|
||||
addNoLanguageDiagnostic(
|
||||
config,
|
||||
makeDiagnostic(
|
||||
"codeql-action/overlay-disabled-by-repository-property",
|
||||
"Improved incremental analysis disabled by repository property",
|
||||
{
|
||||
attributes: {
|
||||
languages: config.languages
|
||||
},
|
||||
markdownMessage: `Improved incremental analysis has been disabled because the \`${"github-codeql-disable-overlay" /* DISABLE_OVERLAY */}\` repository property is set to \`true\`. To re-enable improved incremental analysis, set this property to \`false\` or remove it.`,
|
||||
severity: "note",
|
||||
visibility: {
|
||||
cliSummaryTable: true,
|
||||
statusPage: true,
|
||||
telemetry: true
|
||||
}
|
||||
}
|
||||
)
|
||||
);
|
||||
}
|
||||
if (overlayDatabaseMode === "overlay" /* Overlay */ || await shouldPerformDiffInformedAnalysis(
|
||||
inputs.codeql,
|
||||
inputs.features,
|
||||
|
||||
Reference in New Issue
Block a user