- Add new configuration Parameter
- Write test to check it is read from configuration - Update documentation
This commit is contained in:
parent
fb75ebd750
commit
ee44252240
16 changed files with 1644 additions and 31 deletions
9
lib/config-utils.js
generated
9
lib/config-utils.js
generated
|
|
@ -932,8 +932,15 @@ function dbLocationOrDefault(dbLocation, tempDir) {
|
|||
* This will parse the config from the user input if present, or generate
|
||||
* a default config. The parsed config is then stored to a known location.
|
||||
*/
|
||||
async function initConfig(languagesInput, queriesInput, packsInput, registriesInput, configFile, dbLocation, trapCachingEnabled, debugMode, debugArtifactName, debugDatabaseName, repository, tempDir, codeQL, workspacePath, gitHubVersion, apiDetails, features, logger) {
|
||||
async function initConfig(languagesInput, queriesInput, packsInput, registriesInput, configFile, dbLocation, configuration, trapCachingEnabled, debugMode, debugArtifactName, debugDatabaseName, repository, tempDir, codeQL, workspacePath, gitHubVersion, apiDetails, features, logger) {
|
||||
let config;
|
||||
// if configuration is set, it takes precedence over configFile
|
||||
if (configuration) {
|
||||
const configFileToCreate = path.resolve(workspacePath, "user-config-from-action.yml");
|
||||
fs.writeFileSync(configFileToCreate, configuration);
|
||||
configFile = configFileToCreate;
|
||||
logger.debug(`Using configuration from action input: ${configFile}`);
|
||||
}
|
||||
// If no config file was provided create an empty one
|
||||
if (!configFile) {
|
||||
logger.debug("No configuration file was provided");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue