Skip to content

Commit

Permalink
Fix try to delete main comment at review
Browse files Browse the repository at this point in the history
  • Loading branch information
attiasas committed Sep 12, 2023
1 parent 889a328 commit d64486e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion utils/reviewcomment.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func deleteOldFallbackComments(repo *Repository, pullRequestID int, client vcscl
func getFrogbotReviewComments(existingComments []vcsclient.CommentInfo) (reviewComments []vcsclient.CommentInfo) {
log.Debug("Delete old Frogbot review comments")
for _, comment := range existingComments {
if strings.Contains(comment.Content, outputwriter.CommentGeneratedByFrogbot) || strings.Contains(comment.Content, CommentId) {
if strings.Contains(comment.Content, CommentId) {
log.Debug("Deleting comment id:", comment.ID)
reviewComments = append(reviewComments, comment)
}
Expand Down Expand Up @@ -157,6 +157,7 @@ func generateApplicabilityReviewContent(issue formats.Evidence, relatedCve forma
}

func generateReviewCommentContent(commentType ReviewCommentType, issue formats.SourceCodeRow, writer outputwriter.OutputWriter) (content string) {
content = outputwriter.MarkdownComment(CommentId)
switch commentType {
case IacComment:
content += writer.IacReviewContent(
Expand Down

0 comments on commit d64486e

Please sign in to comment.