Commit 421c7591 authored by Greg Messner's avatar Greg Messner
Browse files

Updated getBranches() to set per_page to DEFAULT_PER_PAGE.

No related merge requests found
Showing with 2 additions and 1 deletion
+2 -1
...@@ -36,7 +36,8 @@ public class RepositoryApi extends AbstractApi { ...@@ -36,7 +36,8 @@ public class RepositoryApi extends AbstractApi {
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public List<Branch> getBranches(Integer projectId) throws GitLabApiException { public List<Branch> getBranches(Integer projectId) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "projects", projectId, "repository", "branches"); Form formData = new GitLabApiForm().withParam("per_page", getDefaultPerPage());
Response response = get(Response.Status.OK, formData.asMap(), "projects", projectId, "repository", "branches");
return (response.readEntity(new GenericType<List<Branch>>() { return (response.readEntity(new GenericType<List<Branch>>() {
})); }));
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment