(repo repository.RepoCommon, baseUrl string)
| 256 | } |
| 257 | |
| 258 | func getValidGitlabRemoteURLs(repo repository.RepoCommon, baseUrl string) ([]string, error) { |
| 259 | remotes, err := repo.GetRemotes() |
| 260 | if err != nil { |
| 261 | return nil, err |
| 262 | } |
| 263 | |
| 264 | urls := make([]string, 0, len(remotes)) |
| 265 | for _, u := range remotes { |
| 266 | p, err := getProjectPath(baseUrl, u) |
| 267 | if err != nil { |
| 268 | continue |
| 269 | } |
| 270 | |
| 271 | urls = append(urls, fmt.Sprintf("%s/%s", baseUrl, p)) |
| 272 | } |
| 273 | |
| 274 | return urls, nil |
| 275 | } |
| 276 | |
| 277 | func validateProjectURL(baseUrl, url string, token *auth.Token) (int, error) { |
| 278 | projectPath, err := getProjectPath(baseUrl, url) |
no test coverage detected