diff --git a/lib/entry-points.js b/lib/entry-points.js index dcbb94c2f..cdbd6ab82 100644 --- a/lib/entry-points.js +++ b/lib/entry-points.js @@ -159658,15 +159658,18 @@ function getConfigFileInput(logger, actions, repositoryProperties, useRepository logger.info(`Using configuration file input from workflow: ${input}`); return input; } - if (!useRepositoryProperty) { - return void 0; - } const propertyValue = repositoryProperties["github-codeql-config-file" /* CONFIG_FILE */]; if (propertyValue !== void 0 && propertyValue.trim().length > 0) { - logger.info( - `Using configuration file input from repository property: ${propertyValue}` - ); - return propertyValue; + if (useRepositoryProperty) { + logger.info( + `Using configuration file input from repository property: ${propertyValue}` + ); + return propertyValue; + } else { + logger.info( + "Ignoring configuration file input from repository property, because the corresponding feature flag is disabled." + ); + } } return void 0; } diff --git a/src/config/file.test.ts b/src/config/file.test.ts index 442d74e85..fef608829 100644 --- a/src/config/file.test.ts +++ b/src/config/file.test.ts @@ -101,4 +101,9 @@ test("getConfigFileInput ignores repository property value when FF is off", asyn "Using configuration file input from repository property", ), ); + t.true( + logger.hasMessage( + "Ignoring configuration file input from repository property, because the corresponding feature flag is disabled.", + ), + ); }); diff --git a/src/config/file.ts b/src/config/file.ts index 9df95cc01..6b8dfdcdc 100644 --- a/src/config/file.ts +++ b/src/config/file.ts @@ -21,19 +21,21 @@ export function getConfigFileInput( return input; } - // Don't take the repository property into consideration if the FF is not enabled. - if (!useRepositoryProperty) { - return undefined; - } - const propertyValue = repositoryProperties[RepositoryPropertyName.CONFIG_FILE]; if (propertyValue !== undefined && propertyValue.trim().length > 0) { - logger.info( - `Using configuration file input from repository property: ${propertyValue}`, - ); - return propertyValue; + // Only use the repository property value if the FF is enabled. + if (useRepositoryProperty) { + logger.info( + `Using configuration file input from repository property: ${propertyValue}`, + ); + return propertyValue; + } else { + logger.info( + "Ignoring configuration file input from repository property, because the corresponding feature flag is disabled.", + ); + } } return undefined;