Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@micheldoumit
Copy link

Issue: #121

Github can return redirect responses in some cases like when a repository is renamed, this PR will address that by handling 301, 302 and 307 responses which are documented here

@coveralls
Copy link

Coverage Status

Coverage increased (+0.07%) to 91.176% when pulling c83293e on micheldoumit:md-redirect-support into 7b09d35 on edgurgel:master.

@coveralls
Copy link

coveralls commented Sep 9, 2017

Coverage Status

Coverage increased (+0.1%) to 91.25% when pulling bb092f1 on micheldoumit:md-redirect-support into 7b09d35 on edgurgel:master.

use_cassette "members#member_" do
assert member?("elixir-conspiracy", "josephwilk", @client) == {302, nil}
{status_code, _} = member?("elixir-conspiracy", "josephwilk", @client)
assert status_code == 404
Copy link
Author

@micheldoumit micheldoumit Sep 9, 2017

Choose a reason for hiding this comment

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

@duksis since now we are redirecting automatically, the result of this method had to change , this will "brake" compatibility but in my opinion makes more sense, WDYT ?

I mocked the scenario: "Response if requester is not an organization member and is inquiring about themselves", I tried to be consistent with the fixtures from other tests.

https://developer.github.com/v3/orgs/members/#response-if-requester-is-not-an-organization-member-and-is-inquiring-about-themselves

Copy link
Collaborator

Choose a reason for hiding this comment

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

by "brake" you mean the fact that it won't return the 30x statuses anymore?

Copy link
Author

@micheldoumit micheldoumit Sep 11, 2017

Choose a reason for hiding this comment

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

Yes, I mean the developers that are handling themselves the 30x (not sure is happening)

Copy link
Collaborator

Choose a reason for hiding this comment

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

even for those It should not be a breaking change.

@coveralls
Copy link

coveralls commented Sep 9, 2017

Coverage Status

Coverage increased (+0.1%) to 91.25% when pulling bb092f1 on micheldoumit:md-redirect-support into 7b09d35 on edgurgel:master.

Repository owner deleted a comment from coveralls Sep 11, 2017
resp = request!(method, url, JSX.encode!(body), authorization_header(auth, extra_headers() ++ @user_agent), extra_options())
case process_response(resp) do
{status, redirect_response} when status in [301, 302, 307] -> redirect_response
request_with_pagination(method, location_header(resp), auth)
Copy link
Collaborator

Choose a reason for hiding this comment

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

something is weird with the indentation here @micheldoumit and also there is this warning now during compilation https://travis-ci.org/edgurgel/tentacat/jobs/273683374#L710

@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 91.213% when pulling d2003c0 on micheldoumit:md-redirect-support into 7b09d35 on edgurgel:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 91.213% when pulling d2003c0 on micheldoumit:md-redirect-support into 7b09d35 on edgurgel:master.

@duksis
Copy link
Collaborator

duksis commented Sep 11, 2017

Thanks @micheldoumit ! closes #121

@duksis duksis merged commit c2874e9 into edgurgel:master Sep 11, 2017
@micheldoumit
Copy link
Author

@duksis @edgurgel thank you, this is my first open source contribution, I'm very glad to help :-)

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