aboutsummaryrefslogtreecommitdiffstats
path: root/routers/repo/issue.go
diff options
context:
space:
mode:
authorLauris BH <lauris@nix.lv>2021-01-17 19:29:10 +0200
committerGitHub <noreply@github.com>2021-01-17 19:29:10 +0200
commitca63a9d3f1120d8c76eb83ff1fd07e0992a683a8 (patch)
treedbf4c75686909e75a90d819cb5590d79001466bd /routers/repo/issue.go
parentacb1ceb1f426e87e7f821c01ab5b60dad7abc03d (diff)
downloadgitea-ca63a9d3f1120d8c76eb83ff1fd07e0992a683a8.tar.gz
gitea-ca63a9d3f1120d8c76eb83ff1fd07e0992a683a8.zip
Add edit, delete and reaction support to code review comments on issue page (#14339)
Diffstat (limited to 'routers/repo/issue.go')
-rw-r--r--routers/repo/issue.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/routers/repo/issue.go b/routers/repo/issue.go
index 7b4044ac7b..6a532dc125 100644
--- a/routers/repo/issue.go
+++ b/routers/repo/issue.go
@@ -1377,7 +1377,26 @@ func ViewIssue(ctx *context.Context) {
ctx.ServerError("Review.LoadCodeComments", err)
return
}
+ for _, codeComments := range comment.Review.CodeComments {
+ for _, lineComments := range codeComments {
+ for _, c := range lineComments {
+ // Check tag.
+ tag, ok = marked[c.PosterID]
+ if ok {
+ c.ShowTag = tag
+ continue
+ }
+ c.ShowTag, err = commentTag(repo, c.Poster, issue)
+ if err != nil {
+ ctx.ServerError("commentTag", err)
+ return
+ }
+ marked[c.PosterID] = c.ShowTag
+ participants = addParticipant(c.Poster, participants)
+ }
+ }
+ }
if err = comment.LoadResolveDoer(); err != nil {
ctx.ServerError("LoadResolveDoer", err)
return