Auto-generate annotation docs (#11835)

Co-authored-by: Ricardo Katz <rikatz@users.noreply.github.com>
This commit is contained in:
Marco Ebert 2024-08-21 09:38:34 +02:00 committed by GitHub
parent f08a1c4fda
commit 0486f013fe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 404 additions and 51 deletions

View file

@ -210,6 +210,21 @@ func StringRiskToRisk(risk string) AnnotationRisk {
}
}
func (a AnnotationRisk) ToString() string {
switch a {
case AnnotationRiskCritical:
return "Critical"
case AnnotationRiskHigh:
return "High"
case AnnotationRiskMedium:
return "Medium"
case AnnotationRiskLow:
return "Low"
default:
return "Unknown"
}
}
func normalizeString(input string) string {
trimmedContent := []string{}
for _, line := range strings.Split(input, "\n") {