(gitClient gitClient, path string)
| 765 | } |
| 766 | |
| 767 | func repoFromPath(gitClient gitClient, path string) (ghrepo.Interface, error) { |
| 768 | scopedClient := gitClient.ForRepo(path) |
| 769 | remotes, err := scopedClient.Remotes() |
| 770 | if err != nil { |
| 771 | return nil, err |
| 772 | } |
| 773 | |
| 774 | if len(remotes) == 0 { |
| 775 | return nil, fmt.Errorf("no remotes configured for %s", path) |
| 776 | } |
| 777 | |
| 778 | var remote *git.Remote |
| 779 | |
| 780 | for _, r := range remotes { |
| 781 | if r.Name == "origin" { |
| 782 | remote = r |
| 783 | break |
| 784 | } |
| 785 | } |
| 786 | |
| 787 | if remote == nil { |
| 788 | remote = remotes[0] |
| 789 | } |
| 790 | |
| 791 | return ghrepo.FromURL(remote.FetchURL) |
| 792 | } |
| 793 | |
| 794 | func possibleDists() []string { |
| 795 | return []string{ |
no test coverage detected