(client *http.Client, repo ghrepo.Interface)
| 746 | } |
| 747 | |
| 748 | func isBinExtension(client *http.Client, repo ghrepo.Interface) (isBin bool, err error) { |
| 749 | var r *release |
| 750 | r, err = fetchLatestRelease(client, repo) |
| 751 | if err != nil { |
| 752 | return |
| 753 | } |
| 754 | |
| 755 | for _, a := range r.Assets { |
| 756 | dists := possibleDists() |
| 757 | for _, d := range dists { |
| 758 | suffix := d |
| 759 | if strings.HasPrefix(d, "windows") { |
| 760 | suffix += ".exe" |
| 761 | } |
| 762 | if strings.HasSuffix(a.Name, suffix) { |
| 763 | isBin = true |
| 764 | break |
| 765 | } |
| 766 | } |
| 767 | } |
| 768 | |
| 769 | return |
| 770 | } |
| 771 | |
| 772 | func repoFromPath(gitClient gitClient, path string) (ghrepo.Interface, error) { |
| 773 | scopedClient := gitClient.ForRepo(path) |
no test coverage detected