diff --git a/services/migrations/gitea_uploader.go b/services/migrations/gitea_uploader.go index 5e4a096222..3e25d51712 100644 --- a/services/migrations/gitea_uploader.go +++ b/services/migrations/gitea_uploader.go @@ -867,7 +867,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) }