From 421c759198953c6f82334854a180be9a7e0fd90b Mon Sep 17 00:00:00 2001 From: Greg Messner Date: Fri, 16 Jun 2017 07:43:50 -0700 Subject: [PATCH] Updated getBranches() to set per_page to DEFAULT_PER_PAGE. --- src/main/java/org/gitlab4j/api/RepositoryApi.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/gitlab4j/api/RepositoryApi.java b/src/main/java/org/gitlab4j/api/RepositoryApi.java index 0ec36e5b..65e06a0f 100644 --- a/src/main/java/org/gitlab4j/api/RepositoryApi.java +++ b/src/main/java/org/gitlab4j/api/RepositoryApi.java @@ -36,7 +36,8 @@ public class RepositoryApi extends AbstractApi { * @throws GitLabApiException if any exception occurs */ public List 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>() { })); } -- GitLab