prow/github/client.go
func (c *Client) EditTeam(t Team) (*Team, error) {
	c.log("EditTeam", t)
	if t.ID == 0 {
		return nil, errors.New("team.ID must be non-zero")
	}
	if c.dry {
		return &t, nil
	}
	id := t.ID
	t.ID = 0
	// Need to send parent_team_id: null
	team := struct {
		Team
		ParentTeamID *int `json:"parent_team_id"`
	}{
		Team:         t,
		ParentTeamID: t.ParentTeamID,
	}
	var retTeam Team
	path := fmt.Sprintf("/teams/%d", id)
	_, err := c.request(&request{
		method: http.MethodPatch,
		path:   path,
		// This accept header enables the nested teams preview.
		// https://developer.github.com/changes/2017-08-30-preview-nested-teams/
		accept:      "application/vnd.github.hellcat-preview+json",
		requestBody: &team,
		exitCodes:   []int{200, 201},
	}, &retTeam)
	return &retTeam, err
}
func (c *Client) EditTeam(t Team) (*Team, error) {
	c.log("EditTeam", t)
	if t.ID == 0 {
		return nil, errors.New("team.ID must be non-zero")
	}
	if c.dry {
		return &t, nil
	}
	id := t.ID
	t.ID = 0
	// Need to send parent_team_id: null
	team := struct {
		Team
		ParentTeamID *int `json:"parent_team_id"`
	}{
		Team:         t,
		ParentTeamID: t.ParentTeamID,
	}
	var retTeam Team
	path := fmt.Sprintf("/teams/%d", id)
	_, err := c.request(&request{
		method: http.MethodPatch,
		path:   path,
		// This accept header enables the nested teams preview.
		// https://developer.github.com/changes/2017-08-30-preview-nested-teams/
		accept:      "application/vnd.github.hellcat-preview+json",
		requestBody: &team,
		exitCodes:   []int{200, 201},
	}, &retTeam)
	return &retTeam, err
}
// EditTeam patches team.ID to contain the specified other values.
//
// See https://developer.github.com/v3/teams/#edit-team