MCPcopy Index your code
hub / github.com/git-bug/git-bug / getValidGitlabRemoteURLs

Function getValidGitlabRemoteURLs

bridge/gitlab/config.go:258–275  ·  view source on GitHub ↗
(repo repository.RepoCommon, baseUrl string)

Source from the content-addressed store, hash-verified

256}
257
258func 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
277func validateProjectURL(baseUrl, url string, token *auth.Token) (int, error) {
278 projectPath, err := getProjectPath(baseUrl, url)

Callers 1

promptProjectURLFunction · 0.85

Calls 2

getProjectPathFunction · 0.85
GetRemotesMethod · 0.65

Tested by

no test coverage detected