diff --git a/services/migrations/gitea_uploader.go b/services/migrations/gitea_uploader.go index 9e4adc55b..838562abd 100644 --- a/services/migrations/gitea_uploader.go +++ b/services/migrations/gitea_uploader.go @@ -862,7 +862,7 @@ func (g *GiteaLocalUploader) CreateReviews(reviews ...*base.Review) error { line := comment.Line if line != 0 { comment.Position = 1 - } else { + } else if comment.DiffHunk != "" { _, _, line, _ = git.ParseDiffHunkString(comment.DiffHunk) }