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

Allow to use custom HttpConnector when only OAuth token is given #124

Merged
merged 2 commits into from
Sep 4, 2014

Conversation

ohtake
Copy link
Contributor

@ohtake ohtake commented Sep 4, 2014

The old pull request is #120.

If you use GitHub.connectUsingOAuth(String oauthAccessToken) or GitHub.connectUsingOAuth(String githubServer, String oauthAccessToken), the constructor of GitHub calls #getMyself.
Because there is no way to call #setConnector before the construction, #getMyself will fail if the server is behind proxies.
This pull request allows library users to use custom HttpConnector when only OAuth token is given.

Example usage is:

GitHub gh = new GitHubBuilder()
    .withEndpoint(serverAPIUrl)
    .withOAuthToken(accessToken)
    .withConnector(new HttpConnectorWithJenkinsProxy())
    .build();

@buildhive
Copy link

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

ohtake added a commit to ohtake/ghprb-plugin that referenced this pull request Sep 4, 2014
kohsuke added a commit that referenced this pull request Sep 4, 2014
Allow to use custom HttpConnector when only OAuth token is given
@kohsuke kohsuke merged commit 95fbf92 into hub4j:master Sep 4, 2014
@ohtake ohtake deleted the connector branch September 5, 2014 02:17
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.

3 participants