Closed sj26 closed 11 years ago
Is .cover?
a built in thing that I've never used?
Yes, but I just realised it's not available in 1.8.7. If that's important, can change to #include?
instead. Looks like there's a stray #in?
in there as well. :-/
Are the response codes documented somewhere? I don't quite follow the logic in the range checking.
GitHub will return a 204 (meaning success without content, i.e. user is an organisation member) but generally 200...300 means success in HTTP parlance. See the GitHub API documentation.
Can we do an explicit check for 204 to match the docs rather than the range? It solves the 1.8.x vs 1.9.x problem in a pretty straightforward manner. :)
On Tue, Nov 27, 2012 at 9:29 PM, Samuel Cochran notifications@github.comwrote:
GitHub will return a 204 (meaning success without content, i.e. user is an organisation member) but generally 200...300 means success in HTTP parlance. See the GitHub API documentationhttp://developer.github.com/v3/orgs/members/#check-membership .
— Reply to this email directly or view it on GitHubhttps://github.com/atmos/warden-github/pull/14#issuecomment-10791266.
This is the way the Github API recommends doing organisation checks, and is more accurate because sometimes you may not have permission to list the members in an organization while still retaining membership.