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