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