-
Notifications
You must be signed in to change notification settings - Fork 12k
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
Support large github organisations #8846
Conversation
I have tested this change and it works.
|
pkg/social/common.go
Outdated
@@ -23,24 +23,26 @@ func isEmailAllowed(email string, allowedDomains []string) bool { | |||
return valid | |||
} | |||
|
|||
func HttpGet(client *http.Client, url string) ([]byte, error) { | |||
func HttpGet(client *http.Client, url string) ([]byte, http.Header, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
think returning an new struct (HttpGetResponse) with the body & headers is clearer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason not to use named return values other than backwards compatibility to pre-1.7? Would remove the need to specify nil and err in all return statements.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@torkelo I'll try to get that change done over the weekend.
* Add new HttpGetResponse struct type * Modify HttpGet() return to use HttpGetResponse * Look up _all_ the teams the user is a member of
@torkelo I have implemented the change you requested. Given #6347 says 1.7 is the minimum version, I implemented @miguelbernadi's suggestion of using named return values. Is there anything else you want to see done before this is merged? I have signed the CLA and the CI bot is happy. |
@torkelo thanks for merging the PR. Would you consider a new patch that contains a hacked up version of the new |
Not Not i want this in stable release branch, but master / nightly is basically the same as 4.4.x as most of our current unstable / unfinished stuff is in develop branch |
Thanks for the clarification. It makes sense. For now we'll carry the patch internally against 4.4.x until 5.0 is released. |
The current github integration only retrieves the first page of results when looking up user's team membership. For most organisations this isn't a problem. When you have a large organisation with over 100 teams not all the teams are retrieved. This patch solves this problem by doing the following things: