Add edit, delete and reaction support to code review comments on issue page (#14339)

This commit is contained in:
Lauris BH 2021-01-17 19:29:10 +02:00 committed by GitHub
parent acb1ceb1f4
commit ca63a9d3f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 101 additions and 20 deletions

View file

@ -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