mirror of
https://github.com/jlengrand/github-api.git
synced 2026-04-16 15:51:16 +00:00
Convention dictates that the method name be "listXyz"
getCollaborators() only fetching the first page is a bug, so we should fix that too.
This commit is contained in:
@@ -317,20 +317,21 @@ public class GHRepository {
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the collaborators on this repository limit to 30.
|
||||
* Gets the collaborators on this repository.
|
||||
* This set always appear to include the owner.
|
||||
*/
|
||||
@WithBridgeMethods(Set.class)
|
||||
public GHPersonSet<GHUser> getCollaborators() throws IOException {
|
||||
return new GHPersonSet<GHUser>(GHUser.wrap(root.retrieve().to("/repos/" + owner.login + "/" + name + "/collaborators", GHUser[].class),root));
|
||||
return new GHPersonSet<GHUser>(listCollaborators().asList());
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets all collaborators using PagedIterable
|
||||
* Lists up the collaborators on this repository.
|
||||
*
|
||||
* @return Users
|
||||
* @throws IOException
|
||||
*/
|
||||
public PagedIterable<GHUser> getAllCollaborators() throws IOException {
|
||||
public PagedIterable<GHUser> listCollaborators() throws IOException {
|
||||
return new PagedIterable<GHUser>() {
|
||||
public PagedIterator<GHUser> iterator() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user