FetchLatestRelease finds the latest published release for a repository.
(ctx context.Context, httpClient *http.Client, repo ghrepo.Interface)
| 214 | |
| 215 | // FetchLatestRelease finds the latest published release for a repository. |
| 216 | func FetchLatestRelease(ctx context.Context, httpClient *http.Client, repo ghrepo.Interface) (*Release, error) { |
| 217 | path := fmt.Sprintf("repos/%s/%s/releases/latest", repo.RepoOwner(), repo.RepoName()) |
| 218 | return fetchReleasePath(ctx, httpClient, repo.RepoHost(), path) |
| 219 | } |
| 220 | |
| 221 | // fetchDraftRelease returns the first draft release that has tagName as its pending tag. |
| 222 | func fetchDraftRelease(ctx context.Context, httpClient *http.Client, repo ghrepo.Interface, tagName string) (*Release, error) { |
no test coverage detected