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

Add an ability to get pull requests by repo, owner and head #723

Merged
merged 1 commit into from
Mar 16, 2016

Conversation

voievodin
Copy link
Contributor

Provides an ability to get a pull request from user1/repo to user2/repo instead of getting pull request by number. The client of this method(such as contribution plugin) needs this improvement because the only way of getting the pull request from one repository to another is getting all the pull requests and then matching them. In that case when repository has 10+ open pull requests it takes some time to get all of the pull requests and parse those into dtos, on the other hand GitService client makes the same request to get all the pull requests returned by server. As a result we had 2 huge requests.

I think here is the only one way for adding additional query parameter to the kohsuke github client - it's custom HttpConnector which adds head query parameter directly to the url and delegates connect call to the DEFAULT implementation.

Here is api ref, koksuke library doesn't allow to put head param.

@skabashnyuk please review

@voievodin voievodin changed the title Add an ability to get pull requests by head Add an ability to get pull requests by repo, owner and head Mar 15, 2016
@skabashnyuk
Copy link
Contributor

For now Ok.

  1. Add please comment to remove this code after upgrade to 1.73 github-api
  2. Create CQ for upgrade to 1.73 github-api
  3. Create issue to remove this patch after 1.73 approval
    See more
    hub4j/github-api@2440a67

@voievodin
Copy link
Contributor Author

  1. done
  2. cq request
  3. issue

voievodin pushed a commit that referenced this pull request Mar 16, 2016
Add an ability to get pull requests by repo, owner and head
@voievodin voievodin merged commit 01fba39 into master Mar 16, 2016
@voievodin voievodin deleted the get_pr_improvement branch March 16, 2016 07:24
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