| 155 | } |
| 156 | |
| 157 | func (c *GithubConfig) getRepoList(repos []string) ([]*github.Repository, error) { |
| 158 | |
| 159 | ghRepos := make([]*github.Repository, 0, len(repos)) |
| 160 | |
| 161 | for _, repo := range repos { |
| 162 | parts := strings.Split(repo, "/") |
| 163 | |
| 164 | if len(parts) != 2 { |
| 165 | return nil, fmt.Errorf("invalid repository name '%v' must be of schema owner/repo", repo) |
| 166 | } |
| 167 | |
| 168 | ghRepo, _, err := c.client.Repositories.Get(context.Background(), parts[0], parts[1]) |
| 169 | if err != nil { |
| 170 | return nil, err |
| 171 | } |
| 172 | ghRepos = append(ghRepos, ghRepo) |
| 173 | } |
| 174 | |
| 175 | return ghRepos, nil |
| 176 | } |
| 177 | |
| 178 | func (c *GithubConfig) discoverRepos(page int) ([]*github.Repository, *github.Response, error) { |
| 179 | affiliations := make([]string, 0) |