mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-29 12:46:16 +01:00
[GITEA] Skip unsupported code comment
- If there's a code comment that's received during the migration that contains no diffhunk, skip it. This either means it was commenting on old diffhunk or it's just a general codecomment. Forgejo supports neither of such type of code comment. - Resolves https://codeberg.org/forgejo/forgejo/issues/1407 (cherry picked from commitae463c7c55
) (cherry picked from commitbf48f02a86
) (cherry picked from commit10c3f102fa
) (cherry picked from commit828b4cc10c
) (cherry picked from commit6427fa65b6
) (cherry picked from commit5b7a43c43f
) (cherry picked from commit4eef0fce72
) (cherry picked from commita46192a4a6
) (cherry picked from commit107a9b8233
) (cherry picked from commit308251fc48
) (cherry picked from commit017c4a53c5
) (cherry picked from commit4534a3393b
) (cherry picked from commit74e0c1663d
) (cherry picked from commit9b17353f85
) (cherry picked from commit09b6f58304
) (cherry picked from commitbc649733a1
) (cherry picked from commitf1d4c783e2
) (cherry picked from commitd6850bc308
) (cherry picked from commit21230d2d24
) (cherry picked from commit569b278382
)
This commit is contained in:
parent
23e4c19d42
commit
773ade3b5f
1 changed files with 5 additions and 0 deletions
|
@ -861,6 +861,11 @@ func (g *GiteaLocalUploader) CreateReviews(reviews ...*base.Review) error {
|
|||
}
|
||||
|
||||
for _, comment := range review.Comments {
|
||||
// Skip code comment if it doesn't have a diff it is commeting on.
|
||||
if comment.DiffHunk == "" {
|
||||
continue
|
||||
}
|
||||
|
||||
line := comment.Line
|
||||
if line != 0 {
|
||||
comment.Position = 1
|
||||
|
|
Loading…
Reference in a new issue