fix excel report
Some checks are pending
CI / Test (push) Waiting to run
CI / End-to-End (push) Waiting to run
CI / Lint (push) Waiting to run
CI / Publish Docker (push) Blocked by required conditions
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-09-27 09:17:52 +10:00
parent 54ff68590c
commit b371e28469
2 changed files with 63 additions and 2 deletions

View File

@@ -203,6 +203,7 @@ func (h *Handler) processConfigChanges(configChanges string) []map[string]string
// Result will hold a list of changes with type and new value
var result []map[string]string
matchFound := false
for _, change := range changes {
// Trim any extra spaces and skip empty lines
@@ -215,6 +216,7 @@ func (h *Handler) processConfigChanges(configChanges string) []map[string]string
// Find the matches using the regex
match := re.FindStringSubmatch(change)
if len(match) > 0 {
matchFound = true
// Create a map with 'type' and 'newValue'
changeMap := map[string]string{
"type": match[1], // config type
@@ -227,6 +229,10 @@ func (h *Handler) processConfigChanges(configChanges string) []map[string]string
}
}
if !matchFound {
h.Logger.Info("No matches found for config change string", "input", configChanges)
}
return result
}