prow/github/client.go
func (c *Client) GetRepoProjects(owner, repo string) ([]Project, error) {
	c.log("GetOrgProjects", owner, repo)
	path := (fmt.Sprintf("/repos/%s/%s/projects", owner, repo))
	var projects []Project
	err := c.readPaginatedResults(
		path,
		"application/vnd.github.inertia-preview+json",
		func() interface{} {
			return &[]Project{}
		},
		func(obj interface{}) {
			projects = append(projects, *(obj.(*[]Project))...)
		},
	)
	if err != nil {
		return nil, err
	}
	return projects, nil
}
func (c *Client) GetRepoProjects(owner, repo string) ([]Project, error) {
	c.log("GetOrgProjects", owner, repo)
	path := (fmt.Sprintf("/repos/%s/%s/projects", owner, repo))
	var projects []Project
	err := c.readPaginatedResults(
		path,
		"application/vnd.github.inertia-preview+json",
		func() interface{} {
			return &[]Project{}
		},
		func(obj interface{}) {
			projects = append(projects, *(obj.(*[]Project))...)
		},
	)
	if err != nil {
		return nil, err
	}
	return projects, nil
}
func ( c * Client ) GetRepoProjects ( owner , repo string ) ( [ ] Project , error ) { c . log ( " " , owner , repo ) path := ( fmt . Sprintf ( " " , owner , repo ) ) var projects [ ] Project err := c . readPaginatedResults ( path , " " , func ( ) interface { } { return & [ ] Project { } } , func ( obj interface { } ) { projects = append ( projects , * ( obj . ( * [ ] Project ) ) ... ) } , ) if err != nil { return nil , err } return projects , nil }
// GetRepoProjects returns the list of projects in this repo.
//
// See https://developer.github.com/v3/projects/#list-repository-projects
GetRepoProjects returns the list of projects in this repo . See https : // developer . github . com / v3 / projects / #list - repository - projects