Merge pull request #517 from jamesatha/repo-by-id

Adds the ability to get a repository by ID
This commit is contained in:
Liam Newman
2019-06-19 17:11:03 -07:00
committed by GitHub

View File

@@ -473,6 +473,14 @@ public class GitHub {
String[] tokens = name.split("/");
return retrieve().to("/repos/" + tokens[0] + '/' + tokens[1], GHRepository.class).wrap(this);
}
/**
* Gets the repository object from its ID
*/
public GHRepository getRepositoryById(String id) throws IOException {
return retrieve().to("/repositories/" + id, GHRepository.class).wrap(this);
}
/**
* Returns a list of popular open source licenses
*