]> source.dussan.org Git - gitea.git/commit
Comments on review should have the same sha (#13448)
authorzeripath <art27@cantab.net>
Mon, 9 Nov 2020 06:15:09 +0000 (06:15 +0000)
committerGitHub <noreply@github.com>
Mon, 9 Nov 2020 06:15:09 +0000 (01:15 -0500)
commitb091c994b5930829b690aedbcf2945198240706b
tree1267a6b5f570155278bcc489237de0b620155988
parent1213301b50f6b4763dc9afe86f4bc120f1805b2a
Comments on review should have the same sha (#13448)

* When replying to an outdated comment it should not appear on the files page

This happened because the comment took the latest commitID as its base instead of the
reviewID that it was replying to.

There was also no way of creating an already outdated comment - and a
reply to a review on an outdated line should be outdated.

Signed-off-by: Andrew Thornton <art27@cantab.net>
* fix test

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix broken migration

Signed-off-by: Andrew Thornton <art27@cantab.net>
* fix mssql

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Create temporary table because ... well MSSQL ...

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Create temporary table because ... well MSSQL ...

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Create temporary table because ... well MSSQL ...

Signed-off-by: Andrew Thornton <art27@cantab.net>
* fix mssql

Signed-off-by: Andrew Thornton <art27@cantab.net>
* move session within the batch

Signed-off-by: Andrew Thornton <art27@cantab.net>
* regen the sqlcmd each time round the loop

Signed-off-by: Andrew Thornton <art27@cantab.net>
* as per @lunny

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
models/issue_comment.go
models/migrations/migrations.go
models/migrations/v158.go [new file with mode: 0644]
services/pull/review.go