add latest release

This commit is contained in:
kamontat
2017-02-19 23:57:44 +07:00
parent 1f4325e7db
commit 166e26d101

View File

@@ -298,6 +298,10 @@ public class GHRepository extends GHObject {
public List<GHRelease> getReleases() throws IOException {
return listReleases().asList();
}
public GHRelease latestRelease() throws IOException {
return root.retrieve().to(getApiTailUrl("releases/latest"), GHRelease.class).wrap(this);
}
public PagedIterable<GHRelease> listReleases() throws IOException {
return new PagedIterable<GHRelease>() {