diff --git a/ExpressAPI/src/config/Config.ts b/ExpressAPI/src/config/Config.ts index ec34e5c6c00b9e831db93e362c9de04ea41e1997..b85336bc7f4b8b8d5c95de5d6d931d3aee0ddc33 100644 --- a/ExpressAPI/src/config/Config.ts +++ b/ExpressAPI/src/config/Config.ts @@ -16,7 +16,7 @@ class Config { }; public enonce: { - default: { description: string; initReadme: boolean; sharedRunnersEnabled: boolean; visibility: string; wikiEnabled: boolean; template: string }; + default: { description: string; initReadme: boolean; sharedRunnersEnabled: boolean; visibility: string; wikiEnabled: boolean; template: string }; baseFiles: Array<string>; filename: string }; public exercice: { @@ -57,14 +57,16 @@ class Config { }; this.enonce = { - default: { + default : { description : process.env.ENONCE_DEFAULT_DESCRIPTION, initReadme : process.env.ENONCE_DEFAULT_INIT_README.toBoolean(), sharedRunnersEnabled: process.env.ENONCE_DEFAULT_SHARED_RUNNERS_ENABLED.toBoolean(), visibility : process.env.ENONCE_DEFAULT_VISIBILITY, wikiEnabled : process.env.ENONCE_DEFAULT_WIKI_ENABLED.toBoolean(), template : process.env.ENONCE_DEFAULT_TEMPLATE.replace('{{USERNAME}}', this.gitlab.account.username).replace('{{TOKEN}}', this.gitlab.account.token) - } + }, + baseFiles: JSON.parse(process.env.ENONCE_BASE_FILES || '[]'), + filename : process.env.ENONCE_FILENAME || '' }; this.exercice = {