mirror of
https://github.com/jlengrand/github-api.git
synced 2026-04-05 00:11:22 +00:00
Merge pull request #517 from jamesatha/repo-by-id
Adds the ability to get a repository by ID
This commit is contained in:
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user