prow/github/client.go
func (c *Client) UpdateTeamRepo(id int, org, repo string, permission RepoPermissionLevel) error {
	c.log("UpdateTeamRepo", id, org, repo, permission)
	if c.fake || c.dry {
		return nil
	}

	data := struct {
		Permission string `json:"permission"`
	}{
		Permission: string(permission),
	}

	_, err := c.request(&request{
		method:      http.MethodPut,
		path:        fmt.Sprintf("/teams/%d/repos/%s/%s", id, org, repo),
		requestBody: &data,
		exitCodes:   []int{204},
	}, nil)
	return err
}
func (c *Client) UpdateTeamRepo(id int, org, repo string, permission RepoPermissionLevel) error {
	c.log("UpdateTeamRepo", id, org, repo, permission)
	if c.fake || c.dry {
		return nil
	}

	data := struct {
		Permission string `json:"permission"`
	}{
		Permission: string(permission),
	}

	_, err := c.request(&request{
		method:      http.MethodPut,
		path:        fmt.Sprintf("/teams/%d/repos/%s/%s", id, org, repo),
		requestBody: &data,
		exitCodes:   []int{204},
	}, nil)
	return err
}
// UpdateTeamRepo adds the repo to the team with the provided role.
//
// https://developer.github.com/v3/teams/#add-or-update-team-repository