MCPcopy Create free account
hub / github.com/ChappIO/git-backup / getRepoList

Method getRepoList

github.go:157–176  ·  view source on GitHub ↗
(repos []string)

Source from the content-addressed store, hash-verified

155}
156
157func (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
178func (c *GithubConfig) discoverRepos(page int) ([]*github.Repository, *github.Response, error) {
179 affiliations := make([]string, 0)

Callers 1

getAllReposMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected