diff --git a/modules/convert/pull_review.go b/modules/convert/pull_review.go index 93ce208224..e8a543fea9 100644 --- a/modules/convert/pull_review.go +++ b/modules/convert/pull_review.go @@ -39,6 +39,7 @@ func ToPullReview(ctx context.Context, r *issues_model.Review, doer *user_model. Dismissed: r.Dismissed, CodeCommentsCount: r.GetCodeCommentsCount(), Submitted: r.CreatedUnix.AsTime(), + Updated: r.UpdatedUnix.AsTime(), HTMLURL: r.HTMLURL(), HTMLPullURL: r.Issue.HTMLURL(), } diff --git a/modules/structs/pull_review.go b/modules/structs/pull_review.go index 7c9360a0c2..ca2af48657 100644 --- a/modules/structs/pull_review.go +++ b/modules/structs/pull_review.go @@ -40,6 +40,8 @@ type PullReview struct { CodeCommentsCount int `json:"comments_count"` // swagger:strfmt date-time Submitted time.Time `json:"submitted_at"` + // swagger:strfmt date-time + Updated time.Time `json:"updated_at"` HTMLURL string `json:"html_url"` HTMLPullURL string `json:"pull_request_url"` diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index 229e219064..fe3185ea77 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -17891,6 +17891,11 @@ "team": { "$ref": "#/definitions/Team" }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + }, "user": { "$ref": "#/definitions/User" }