()
| 35 | } |
| 36 | |
| 37 | func (g *GitLabConfig) setDefaults() { |
| 38 | if g.Member == nil { |
| 39 | g.Member = boolPointer(true) |
| 40 | } |
| 41 | if g.Owned == nil { |
| 42 | g.Owned = boolPointer(true) |
| 43 | } |
| 44 | if g.Starred == nil { |
| 45 | g.Starred = boolPointer(true) |
| 46 | } |
| 47 | if g.JobName == "" { |
| 48 | g.JobName = "GitLab" |
| 49 | } |
| 50 | if g.URL == "" { |
| 51 | g.client, _ = gitlab.NewClient(g.AccessToken) |
| 52 | } else { |
| 53 | client, err := gitlab.NewClient(g.AccessToken, gitlab.WithBaseURL(g.URL)) |
| 54 | if err != nil { |
| 55 | panic(err) |
| 56 | } |
| 57 | g.client = client |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | func (g *GitLabConfig) ListRepositories() ([]*Repository, error) { |
| 62 | repos, err := g.getAllRepos() |
nothing calls this directly
no test coverage detected