1
0
Fork 0

Add updated_at field to PullReview API object (#21812)

* Closes #19997

Adds an `updated_at` time field to the `PullReview` API object to
specify when the pull request review's state changed.

Signed-off-by: Yarden Shoham <hrsi88@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
Yarden Shoham 2022-11-15 11:33:52 +02:00 committed by GitHub
parent c772934ff6
commit 6c8ff32511
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 0 deletions

View file

@ -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(),
}

View file

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

View file

@ -17891,6 +17891,11 @@
"team": {
"$ref": "#/definitions/Team"
},
"updated_at": {
"type": "string",
"format": "date-time",
"x-go-name": "Updated"
},
"user": {
"$ref": "#/definitions/User"
}