Skip to content

Commit

Permalink
feat: ai fix html
Browse files Browse the repository at this point in the history
  • Loading branch information
teodora-sandu committed Jun 7, 2024
1 parent b5b28fb commit 15554ec
Show file tree
Hide file tree
Showing 2 changed files with 445 additions and 95 deletions.
2 changes: 2 additions & 0 deletions infrastructure/code/code_html.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ func getCodeDetailsHtml(issue snyk.Issue) string {

data := map[string]interface{}{
"IssueTitle": additionalData.Title,
"IssueMessage": additionalData.Message,
"IssueType": getIssueType(additionalData),
"SeverityIcon": getSeverityIconSvg(issue),
"CWEs": issue.CWEs,
Expand Down Expand Up @@ -229,6 +230,7 @@ func formatDate(date time.Time) string {
}

func getSeverityIconSvg(issue snyk.Issue) template.HTML {
// TODO: move these to actual icons
switch issue.Severity {
case snyk.Critical:
return template.HTML(`<svg fill="none" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 16 16">
Expand Down
Loading

0 comments on commit 15554ec

Please sign in to comment.