From 1baeff9623dd3bc4fbd6b04257221bc9535df6ec Mon Sep 17 00:00:00 2001 From: Petar Hristov <hristov@itc.rwth-aachen.de> Date: Wed, 25 Jan 2023 08:53:21 +0100 Subject: [PATCH] Fix: Prevent deletion of list of reporting variables --- src/KPI Generator/Reporting.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/KPI Generator/Reporting.cs b/src/KPI Generator/Reporting.cs index 0d9a6a7..5a07c0e 100644 --- a/src/KPI Generator/Reporting.cs +++ b/src/KPI Generator/Reporting.cs @@ -109,7 +109,8 @@ public abstract class Reporting<O> where O : class // Delete files or organizations that are not valid anymore foreach (var fileInProject in projectTree.Where(file => file.Type.Equals("blob"))) { - if (!files.Any(f => f.Path.Equals(fileInProject.Path)) && !fileInProject.Path.Equals("README.md")) + // Ignore the files named "List of Reporting Variables.xlsx" and "README.md" + if (!files.Any(f => f.Path.Equals(fileInProject.Path)) && (!fileInProject.Path.Equals("README.md") || !fileInProject.Path.Equals("List of Reporting Variables.xlsx"))) { // Add Action actions.Add(new CreateCommitRequestAction(CreateCommitRequestActionType.Delete, fileInProject.Path)); -- GitLab