Skip to content

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

Merged
kohsuke merged 1 commit intohub4j:masterfrom
if6was9:fix-get-members-paging
Feb 14, 2015
Merged

fix #145 GHTeam.getMembers() does not page properly#146
kohsuke merged 1 commit intohub4j:masterfrom
if6was9:fix-get-members-paging

Conversation

@if6was9
Copy link
Copy Markdown

@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
Copy Markdown

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

@buildhive
Copy link
Copy Markdown

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

@suryagaddipati
Copy link
Copy Markdown
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
Copy Markdown
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.

4 participants