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

Getting github orgs more than 30 #847

Merged
merged 3 commits into from
Jan 26, 2015
Merged

Conversation

udzura
Copy link

@udzura udzura commented Jan 26, 2015

Hi, dear team

github.com (or GH Enterprise) API have a default per_page limit to 30. So GetOrgs function could not get organizations after the 31st one.

I have added the pagination loop and found this fixed.

@udzura
Copy link
Author

udzura commented Jan 26, 2015

I have also found https://github.com/stvp/flowdock is missing... Is there any fork?

if len(orgs) == 0 || err != nil {
break
}
for _, v := range orgs {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of looping, you can do something like this:

allorgs = append(allorgs, orgs...)

@bradrydzewski
Copy link

I have also found https://github.com/stvp/flowdock is missing... Is there any fork?

@udzura I have a local copy. I'll vendor the dependency and push and update shortly

@bradrydzewski
Copy link

ok, just merged #848 to fix the flowdock issue!

@udzura
Copy link
Author

udzura commented Jan 26, 2015

@bradrydzewski Hi, test passed again. Thank you for review!

@bradrydzewski
Copy link

cool, much thanks for the patch!

bradrydzewski added a commit that referenced this pull request Jan 26, 2015
Getting github orgs more than 30
@bradrydzewski bradrydzewski merged commit 9aa6c92 into harness:master Jan 26, 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

2 participants