-
Notifications
You must be signed in to change notification settings - Fork 737
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
Allows to define page size for repository lists and other API enhancements #45
Conversation
Extension of the listRepositories() with the desired pageSize. This allows to reduce the number of calls to GitHub API for fetching the entire set of repositories browsing all the pages. Additionally allows to match the UX paging with the underlying GitHub API paging, increasing performance and reducing hourly API allowance.
Kohsuke Kawaguchi » github-api #95 SUCCESS |
When GitHub repositories are associated to organisations, the owner is NOT the user but the org itself.
Kohsuke Kawaguchi » github-api #96 SUCCESS |
Kohsuke Kawaguchi » github-api #97 FAILURE |
Retrieves the list of commits included in the pull request. Commit object returned is not a full GHCommit and includes just a small subset of information.
Kohsuke Kawaguchi » github-api #101 SUCCESS |
Kohsuke Kawaguchi » github-api #102 SUCCESS |
@@ -379,6 +379,17 @@ protected void wrapUp(GHPullRequest[] page) { | |||
} | |||
|
|||
/** | |||
* Retrieves all the pull requests of a particular state by knowing organisation and repository | |||
*/ | |||
public static PagedIterable<GHPullRequest> listPullRequests(final GitHub root, final GHPerson owner, final String repositoryName, final GHIssueState state) { |
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.
I think I know why you wanted methods like this (to avoid unnecessary REST API calls to getRepository()
), but I don't want the library to become full of these short-cuts.
To address this without cluttering the API, I think we need to defer the REST call to retrieve the state of the repository. So I tweaked your commits and removed this method. I hope you are OK with this for the time being.
Extension of the listRepositories() with the desired
pageSize. This allows to reduce the number of calls
to GitHub API for fetching the entire set of repositories
browsing all the pages.
Additionally allows to match the UX paging with the
underlying GitHub API paging, increasing performance
and reducing hourly API allowance.
Last addition was on the GitHub PullRequest object:
allows to get the associated commits with their
details (which is unfortunately NOT a GHCommit object)