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

Function getValidGithubRemoteURLs

bridge/github/config.go:433–452  ·  view source on GitHub ↗
(repo repository.RepoCommon)

Source from the content-addressed store, hash-verified

431}
432
433func getValidGithubRemoteURLs(repo repository.RepoCommon) ([]string, error) {
434 remotes, err := repo.GetRemotes()
435 if err != nil {
436 return nil, err
437 }
438
439 urls := make([]string, 0, len(remotes))
440 for _, url := range remotes {
441 // split url can work again with shortURL
442 owner, project, err := splitURL(url)
443 if err == nil {
444 shortURL := fmt.Sprintf("%s/%s/%s", "github.com", owner, project)
445 urls = append(urls, shortURL)
446 }
447 }
448
449 sort.Strings(urls)
450
451 return urls, nil
452}
453
454func promptLogin() (string, error) {
455 var login string

Callers 1

promptURLFunction · 0.85

Calls 2

splitURLFunction · 0.70
GetRemotesMethod · 0.65

Tested by

no test coverage detected