mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 11:27:40 -04:00 
			
		
		
		
	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:
		| @@ -39,6 +39,7 @@ func ToPullReview(ctx context.Context, r *issues_model.Review, doer *user_model. | |||||||
| 		Dismissed:         r.Dismissed, | 		Dismissed:         r.Dismissed, | ||||||
| 		CodeCommentsCount: r.GetCodeCommentsCount(), | 		CodeCommentsCount: r.GetCodeCommentsCount(), | ||||||
| 		Submitted:         r.CreatedUnix.AsTime(), | 		Submitted:         r.CreatedUnix.AsTime(), | ||||||
|  | 		Updated:           r.UpdatedUnix.AsTime(), | ||||||
| 		HTMLURL:           r.HTMLURL(), | 		HTMLURL:           r.HTMLURL(), | ||||||
| 		HTMLPullURL:       r.Issue.HTMLURL(), | 		HTMLPullURL:       r.Issue.HTMLURL(), | ||||||
| 	} | 	} | ||||||
|   | |||||||
| @@ -40,6 +40,8 @@ type PullReview struct { | |||||||
| 	CodeCommentsCount int             `json:"comments_count"` | 	CodeCommentsCount int             `json:"comments_count"` | ||||||
| 	// swagger:strfmt date-time | 	// swagger:strfmt date-time | ||||||
| 	Submitted time.Time `json:"submitted_at"` | 	Submitted time.Time `json:"submitted_at"` | ||||||
|  | 	// swagger:strfmt date-time | ||||||
|  | 	Updated time.Time `json:"updated_at"` | ||||||
|  |  | ||||||
| 	HTMLURL     string `json:"html_url"` | 	HTMLURL     string `json:"html_url"` | ||||||
| 	HTMLPullURL string `json:"pull_request_url"` | 	HTMLPullURL string `json:"pull_request_url"` | ||||||
|   | |||||||
| @@ -17891,6 +17891,11 @@ | |||||||
|         "team": { |         "team": { | ||||||
|           "$ref": "#/definitions/Team" |           "$ref": "#/definitions/Team" | ||||||
|         }, |         }, | ||||||
|  |         "updated_at": { | ||||||
|  |           "type": "string", | ||||||
|  |           "format": "date-time", | ||||||
|  |           "x-go-name": "Updated" | ||||||
|  |         }, | ||||||
|         "user": { |         "user": { | ||||||
|           "$ref": "#/definitions/User" |           "$ref": "#/definitions/User" | ||||||
|         } |         } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user