Skip to content

Commit d6d9dd5

Browse files
authored
Fix try to delete main comment at review (#487)
1 parent 889a328 commit d6d9dd5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

utils/reviewcomment.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ func deleteOldFallbackComments(repo *Repository, pullRequestID int, client vcscl
9191
func getFrogbotReviewComments(existingComments []vcsclient.CommentInfo) (reviewComments []vcsclient.CommentInfo) {
9292
log.Debug("Delete old Frogbot review comments")
9393
for _, comment := range existingComments {
94-
if strings.Contains(comment.Content, outputwriter.CommentGeneratedByFrogbot) || strings.Contains(comment.Content, CommentId) {
94+
if strings.Contains(comment.Content, CommentId) {
9595
log.Debug("Deleting comment id:", comment.ID)
9696
reviewComments = append(reviewComments, comment)
9797
}
@@ -157,6 +157,7 @@ func generateApplicabilityReviewContent(issue formats.Evidence, relatedCve forma
157157
}
158158

159159
func generateReviewCommentContent(commentType ReviewCommentType, issue formats.SourceCodeRow, writer outputwriter.OutputWriter) (content string) {
160+
content = outputwriter.MarkdownComment(CommentId)
160161
switch commentType {
161162
case IacComment:
162163
content += writer.IacReviewContent(

0 commit comments

Comments
 (0)