summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--integrations/api_pull_review_test.go2
-rw-r--r--modules/convert/pull_review.go3
-rw-r--r--modules/structs/pull_review.go3
-rw-r--r--templates/swagger/v1_json.tmpl3
4 files changed, 8 insertions, 3 deletions
diff --git a/integrations/api_pull_review_test.go b/integrations/api_pull_review_test.go
index 8be194602f..19b05d545b 100644
--- a/integrations/api_pull_review_test.go
+++ b/integrations/api_pull_review_test.go
@@ -66,7 +66,7 @@ func TestAPIPullReview(t *testing.T) {
var reviewComments []*api.PullReviewComment
DecodeJSON(t, resp, &reviewComments)
assert.Len(t, reviewComments, 1)
- assert.EqualValues(t, "Ghost", reviewComments[0].Reviewer.UserName)
+ assert.EqualValues(t, "Ghost", reviewComments[0].Poster.UserName)
assert.EqualValues(t, "a review from a deleted user", reviewComments[0].Body)
assert.EqualValues(t, comment.ID, reviewComments[0].ID)
assert.EqualValues(t, comment.UpdatedUnix, reviewComments[0].Updated.Unix())
diff --git a/modules/convert/pull_review.go b/modules/convert/pull_review.go
index 18c6c8e58c..b461b27b5a 100644
--- a/modules/convert/pull_review.go
+++ b/modules/convert/pull_review.go
@@ -86,7 +86,8 @@ func ToPullReviewCommentList(review *models.Review, doer *models.User) ([]*api.P
apiComment := &api.PullReviewComment{
ID: comment.ID,
Body: comment.Content,
- Reviewer: ToUser(comment.Poster, doer),
+ Poster: ToUser(comment.Poster, doer),
+ Resolver: ToUser(comment.ResolveDoer, doer),
ReviewID: review.ID,
Created: comment.CreatedUnix.AsTime(),
Updated: comment.UpdatedUnix.AsTime(),
diff --git a/modules/structs/pull_review.go b/modules/structs/pull_review.go
index 261d00fde8..6544604acb 100644
--- a/modules/structs/pull_review.go
+++ b/modules/structs/pull_review.go
@@ -49,7 +49,8 @@ type PullReview struct {
type PullReviewComment struct {
ID int64 `json:"id"`
Body string `json:"body"`
- Reviewer *User `json:"user"`
+ Poster *User `json:"user"`
+ Resolver *User `json:"resolver"`
ReviewID int64 `json:"pull_request_review_id"`
// swagger:strfmt date-time
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl
index 120d020958..10f016f4f4 100644
--- a/templates/swagger/v1_json.tmpl
+++ b/templates/swagger/v1_json.tmpl
@@ -15460,6 +15460,9 @@
"type": "string",
"x-go-name": "HTMLPullURL"
},
+ "resolver": {
+ "$ref": "#/definitions/User"
+ },
"updated_at": {
"type": "string",
"format": "date-time",