diff options
author | sotho <alex@segv.de> | 2021-03-28 00:37:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-28 00:37:51 +0100 |
commit | e7609929c18e1107b03bacb3e31049a7cbb6ffc8 (patch) | |
tree | 2cc2ec2b8a3ead75f9ce2907f6e4209c658a55db /modules | |
parent | 290cf75f9343a43d9770b1d6f8f3332a23357e27 (diff) | |
download | gitea-e7609929c18e1107b03bacb3e31049a7cbb6ffc8.tar.gz gitea-e7609929c18e1107b03bacb3e31049a7cbb6ffc8.zip |
Expose resolver via API (#15167)
* Expose resolver via API
Diffstat (limited to 'modules')
-rw-r--r-- | modules/convert/pull_review.go | 3 | ||||
-rw-r--r-- | modules/structs/pull_review.go | 3 |
2 files changed, 4 insertions, 2 deletions
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 |