mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-11-04 03:10:20 +00:00 
			
		
		
		
	Fix null requested_reviewer from API (#31773)
If the assign the pull request review to a team, it did not show the members of the team in the "requested_reviewers" field, so the field was null. As a solution, I added the team members to the array. fix #31764
This commit is contained in:
		@@ -9,21 +9,22 @@ import (
 | 
			
		||||
 | 
			
		||||
// PullRequest represents a pull request
 | 
			
		||||
type PullRequest struct {
 | 
			
		||||
	ID                 int64      `json:"id"`
 | 
			
		||||
	URL                string     `json:"url"`
 | 
			
		||||
	Index              int64      `json:"number"`
 | 
			
		||||
	Poster             *User      `json:"user"`
 | 
			
		||||
	Title              string     `json:"title"`
 | 
			
		||||
	Body               string     `json:"body"`
 | 
			
		||||
	Labels             []*Label   `json:"labels"`
 | 
			
		||||
	Milestone          *Milestone `json:"milestone"`
 | 
			
		||||
	Assignee           *User      `json:"assignee"`
 | 
			
		||||
	Assignees          []*User    `json:"assignees"`
 | 
			
		||||
	RequestedReviewers []*User    `json:"requested_reviewers"`
 | 
			
		||||
	State              StateType  `json:"state"`
 | 
			
		||||
	Draft              bool       `json:"draft"`
 | 
			
		||||
	IsLocked           bool       `json:"is_locked"`
 | 
			
		||||
	Comments           int        `json:"comments"`
 | 
			
		||||
	ID                      int64      `json:"id"`
 | 
			
		||||
	URL                     string     `json:"url"`
 | 
			
		||||
	Index                   int64      `json:"number"`
 | 
			
		||||
	Poster                  *User      `json:"user"`
 | 
			
		||||
	Title                   string     `json:"title"`
 | 
			
		||||
	Body                    string     `json:"body"`
 | 
			
		||||
	Labels                  []*Label   `json:"labels"`
 | 
			
		||||
	Milestone               *Milestone `json:"milestone"`
 | 
			
		||||
	Assignee                *User      `json:"assignee"`
 | 
			
		||||
	Assignees               []*User    `json:"assignees"`
 | 
			
		||||
	RequestedReviewers      []*User    `json:"requested_reviewers"`
 | 
			
		||||
	RequestedReviewersTeams []*Team    `json:"requested_reviewers_teams"`
 | 
			
		||||
	State                   StateType  `json:"state"`
 | 
			
		||||
	Draft                   bool       `json:"draft"`
 | 
			
		||||
	IsLocked                bool       `json:"is_locked"`
 | 
			
		||||
	Comments                int        `json:"comments"`
 | 
			
		||||
	// number of review comments made on the diff of a PR review (not including comments on commits or issues in a PR)
 | 
			
		||||
	ReviewComments int `json:"review_comments"`
 | 
			
		||||
	Additions      int `json:"additions"`
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user