Add deprecated not to Github#getRepositoryById

This commit is contained in:
M. Abdullah Onus
2021-01-03 15:44:28 +03:00
parent ffecc390eb
commit 26d30663c4

View File

@@ -549,6 +549,23 @@ public class GitHub {
return GHRepository.read(this, tokens[0], tokens[1]);
}
/**
* Gets the repository object from its ID
*
* @param id
* the id
* @return the repository by id
* @throws IOException
* the io exception
*
* @deprecated Do not use this method. It was added due to misunderstanding of the type of parameter.
* Use the alternative getRepositoryById method with long type parameter instead
*/
@Deprecated
public GHRepository getRepositoryById(String id) throws IOException {
return createRequest().withUrlPath("/repositories/" + id).fetch(GHRepository.class).wrap(this);
}
/**
* Gets the repository object from its ID
*