mirror of
https://github.com/github/codeql-action.git
synced 2026-10-03 09:14:58 +00:00
Log when repository property has a value but is ignored
This commit is contained in:
17
lib/entry-points.js
generated
17
lib/entry-points.js
generated
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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.",
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user