Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #145 GHTeam.getMembers() does not page properly #146

Merged
merged 1 commit into from
Feb 14, 2015
Merged

fix #145 GHTeam.getMembers() does not page properly #146

merged 1 commit into from
Feb 14, 2015

Conversation

if6was9
Copy link

@if6was9 if6was9 commented Dec 28, 2014

GHTeam.getMembers() would only return the first 30 members of an organization. This fixes that by reading each page of results.

@buildhive
Copy link

Kohsuke Kawaguchi » github-api #257 SUCCESS
This pull request looks good
(what's this?)

@buildhive
Copy link

Kohsuke Kawaguchi » github-api #258 SUCCESS
This pull request looks good
(what's this?)

@suryagaddipati
Copy link
Collaborator

Does Collections.unmodifiableSet(members); eager fetch all the members ?

I wish the method returned Iterable instead of Set so this could have been implemented transparently.

@if6was9
Copy link
Author

if6was9 commented Dec 29, 2014

The while loop iterates through all the pages and collects all the GHUser items. The immutable set isn't strictly necessary. It could be removed with no consequence.

I agree about the return type. I didn't want to modify the API...just fix the implementation.

@kohsuke kohsuke merged commit e356675 into hub4j:master Feb 14, 2015
kohsuke added a commit that referenced this pull request Feb 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants