FetchLatestRelease finds the latest published release for a repository.
(ctx context.Context, httpClient *http.Client, repo ghrepo.Interface)
| 226 | |
| 227 | // FetchLatestRelease finds the latest published release for a repository. |
| 228 | func FetchLatestRelease(ctx context.Context, httpClient *http.Client, repo ghrepo.Interface) (*Release, error) { |
| 229 | path := fmt.Sprintf("repos/%s/%s/releases/latest", repo.RepoOwner(), repo.RepoName()) |
| 230 | return fetchReleasePath(ctx, httpClient, repo.RepoHost(), path) |
| 231 | } |
| 232 | |
| 233 | // fetchDraftRelease returns the first draft release that has tagName as its pending tag. |
| 234 | func fetchDraftRelease(ctx context.Context, httpClient *http.Client, repo ghrepo.Interface, tagName string) (*Release, error) { |
no test coverage detected