Simplify default repo properties

This commit is contained in:
Henry Mercer
2026-03-10 11:33:00 +00:00
parent 3592fe5d7a
commit 3d2bdbbd3b
2 changed files with 8 additions and 8 deletions

7
lib/init-action.js generated
View File

@@ -109713,6 +109713,7 @@ async function run(startedAt) {
}
analysisKinds = await getAnalysisKinds(logger);
const debugMode = getOptionalInput("debug") === "true" || core13.isDebug();
const repositoryProperties = repositoryPropertiesResult.orElse({});
config = await initConfig2(features, {
analysisKinds,
languagesInput: getOptionalInput("languages"),
@@ -109740,12 +109741,12 @@ async function run(startedAt) {
githubVersion: gitHubVersion,
apiDetails,
features,
repositoryProperties: repositoryPropertiesResult.orElse({}),
repositoryProperties,
enableFileCoverageInformation: await getFileCoverageInformationEnabled(
debugMode,
codeql,
features,
repositoryPropertiesResult.orElse({})
repositoryProperties
),
logger
});
@@ -109761,7 +109762,7 @@ async function run(startedAt) {
)
);
}
if (config.enableFileCoverageInformation && isAnalyzingPullRequest() && await features.getValue("skip_file_coverage_on_prs" /* SkipFileCoverageOnPrs */, codeql) && repositoryPropertiesResult.orElse({})["github-codeql-file-coverage-on-prs" /* FILE_COVERAGE_ON_PRS */] === true) {
if (config.enableFileCoverageInformation && isAnalyzingPullRequest() && await features.getValue("skip_file_coverage_on_prs" /* SkipFileCoverageOnPrs */, codeql) && repositoryProperties["github-codeql-file-coverage-on-prs" /* FILE_COVERAGE_ON_PRS */] === true) {
addNoLanguageDiagnostic(
config,
makeTelemetryDiagnostic(

View File

@@ -348,6 +348,7 @@ async function run(startedAt: Date) {
analysisKinds = await getAnalysisKinds(logger);
const debugMode = getOptionalInput("debug") === "true" || core.isDebug();
const repositoryProperties = repositoryPropertiesResult.orElse({});
config = await initConfig(features, {
analysisKinds,
languagesInput: getOptionalInput("languages"),
@@ -377,12 +378,12 @@ async function run(startedAt: Date) {
githubVersion: gitHubVersion,
apiDetails,
features,
repositoryProperties: repositoryPropertiesResult.orElse({}),
repositoryProperties,
enableFileCoverageInformation: await getFileCoverageInformationEnabled(
debugMode,
codeql,
features,
repositoryPropertiesResult.orElse({}),
repositoryProperties,
),
logger,
});
@@ -404,9 +405,7 @@ async function run(startedAt: Date) {
config.enableFileCoverageInformation &&
isAnalyzingPullRequest() &&
(await features.getValue(Feature.SkipFileCoverageOnPrs, codeql)) &&
repositoryPropertiesResult.orElse({})[
RepositoryPropertyName.FILE_COVERAGE_ON_PRS
] === true
repositoryProperties[RepositoryPropertyName.FILE_COVERAGE_ON_PRS] === true
) {
addNoLanguageDiagnostic(
config,