From 417f04261e1091fdb74391fc2ec05fccf6bdee5c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C3=ABl=20Minelli?= <michael@minelli.me>
Date: Mon, 31 Jul 2023 23:47:47 +0200
Subject: [PATCH] Config => Add baseFiles and filename to enonce

---
 ExpressAPI/src/config/Config.ts | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/ExpressAPI/src/config/Config.ts b/ExpressAPI/src/config/Config.ts
index ec34e5c..b85336b 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 = {
-- 
GitLab