diff --git a/libs/net/ches/ChesService.cs b/libs/net/ches/ChesService.cs index 0c2ec4d61d..2d4745c5c4 100644 --- a/libs/net/ches/ChesService.cs +++ b/libs/net/ches/ChesService.cs @@ -263,14 +263,14 @@ public async Task SendEmailAsync(IEmail email) /// /// email body as html markup - possibly containing base64 encoded images /// dictionary of the images as attachments and the 'key' to use to search and replace them in the markup - private Dictionary GetImagesFromEmailBody(string emailBody) + private static Dictionary GetImagesFromEmailBody(string emailBody) { - Dictionary imageDictionary = new Dictionary(); + var imageDictionary = new Dictionary(); var inlineImageMatches = Base64InlineImageRegex.Matches(emailBody); if (inlineImageMatches.Any()) { - foreach (Match m in inlineImageMatches) + foreach (var m in inlineImageMatches.Cast()) { var imageMediaType = m.Groups[1].Value; var base64Image = m.Groups[2].Value; @@ -281,7 +281,8 @@ private Dictionary GetImagesFromEmailBody(string emailB Filename = Guid.NewGuid().ToString(), Content = base64Image }; - imageDictionary.Add(m.Value, attachment); + if (!imageDictionary.ContainsKey(m.Value)) + imageDictionary.Add(m.Value, attachment); } } return imageDictionary; diff --git a/openshift/kustomize/tekton/base/triggers/template.yaml b/openshift/kustomize/tekton/base/triggers/template.yaml index 199114acb1..93ac11bca1 100644 --- a/openshift/kustomize/tekton/base/triggers/template.yaml +++ b/openshift/kustomize/tekton/base/triggers/template.yaml @@ -66,7 +66,7 @@ spec: workspaces: - name: source persistentVolumeClaim: - claimName: pipelines + claimName: repo - name: conditions volumeClaimTemplate: spec: