diff --git a/src/main/java/com/cloudbees/jenkins/plugins/bitbucket/server/client/BitbucketServerAPIClient.java b/src/main/java/com/cloudbees/jenkins/plugins/bitbucket/server/client/BitbucketServerAPIClient.java index dc3a8bd8d..eac2e0572 100644 --- a/src/main/java/com/cloudbees/jenkins/plugins/bitbucket/server/client/BitbucketServerAPIClient.java +++ b/src/main/java/com/cloudbees/jenkins/plugins/bitbucket/server/client/BitbucketServerAPIClient.java @@ -139,9 +139,9 @@ public class BitbucketServerAPIClient implements BitbucketApi { private static final String API_REPOSITORY_PATH = API_BASE_PATH + "/projects/{owner}/repos/{repo}"; private static final String API_DEFAULT_BRANCH_PATH = API_REPOSITORY_PATH + "/branches/default"; private static final String API_BRANCHES_PATH = API_REPOSITORY_PATH + "/branches{?start,limit}"; - private static final String API_BRANCHES_FILTERED_PATH = API_REPOSITORY_PATH + "/branches{?filterText}"; + private static final String API_BRANCHES_FILTERED_PATH = API_REPOSITORY_PATH + "/branches{?filterText,start,limit}"; private static final String API_TAGS_PATH = API_REPOSITORY_PATH + "/tags{?start,limit}"; - private static final String API_TAGS_FILTERED_PATH = API_REPOSITORY_PATH + "/tags{?filterText}"; + private static final String API_TAGS_FILTERED_PATH = API_REPOSITORY_PATH + "/tags{?filterText,start,limit}"; private static final String API_PULL_REQUESTS_PATH = API_REPOSITORY_PATH + "/pull-requests{?start,limit,at,direction,state}"; private static final String API_PULL_REQUEST_PATH = API_REPOSITORY_PATH + "/pull-requests/{id}"; private static final String API_PULL_REQUEST_MERGE_PATH = API_REPOSITORY_PATH + "/pull-requests/{id}/merge"; diff --git a/src/test/resources/com/cloudbees/jenkins/plugins/bitbucket/server/payload/1.0-projects-amuniz-repos-test-repos-branches_filterText_feature_2FBB-1.json b/src/test/resources/com/cloudbees/jenkins/plugins/bitbucket/server/payload/1.0-projects-amuniz-repos-test-repos-branches_filterText_feature_2FBB-1_start_0_limit_200.json similarity index 100% rename from src/test/resources/com/cloudbees/jenkins/plugins/bitbucket/server/payload/1.0-projects-amuniz-repos-test-repos-branches_filterText_feature_2FBB-1.json rename to src/test/resources/com/cloudbees/jenkins/plugins/bitbucket/server/payload/1.0-projects-amuniz-repos-test-repos-branches_filterText_feature_2FBB-1_start_0_limit_200.json diff --git a/src/test/resources/com/cloudbees/jenkins/plugins/bitbucket/server/payload/1.0-projects-amuniz-repos-test-repos-branches_filterText_feature_2FBB-2.json b/src/test/resources/com/cloudbees/jenkins/plugins/bitbucket/server/payload/1.0-projects-amuniz-repos-test-repos-branches_filterText_feature_2FBB-2_start_0_limit_200.json similarity index 100% rename from src/test/resources/com/cloudbees/jenkins/plugins/bitbucket/server/payload/1.0-projects-amuniz-repos-test-repos-branches_filterText_feature_2FBB-2.json rename to src/test/resources/com/cloudbees/jenkins/plugins/bitbucket/server/payload/1.0-projects-amuniz-repos-test-repos-branches_filterText_feature_2FBB-2_start_0_limit_200.json diff --git a/src/test/resources/com/cloudbees/jenkins/plugins/bitbucket/server/payload/1.0-projects-amuniz-repos-test-repos-branches_filterText_main.json b/src/test/resources/com/cloudbees/jenkins/plugins/bitbucket/server/payload/1.0-projects-amuniz-repos-test-repos-branches_filterText_main_start_0_limit_200.json similarity index 100% rename from src/test/resources/com/cloudbees/jenkins/plugins/bitbucket/server/payload/1.0-projects-amuniz-repos-test-repos-branches_filterText_main.json rename to src/test/resources/com/cloudbees/jenkins/plugins/bitbucket/server/payload/1.0-projects-amuniz-repos-test-repos-branches_filterText_main_start_0_limit_200.json diff --git a/src/test/resources/com/cloudbees/jenkins/plugins/bitbucket/server/payload/1.0-projects-amuniz-repos-test-repos-branches_filterText_release_2Frelease-1.json b/src/test/resources/com/cloudbees/jenkins/plugins/bitbucket/server/payload/1.0-projects-amuniz-repos-test-repos-branches_filterText_release_2Frelease-1_start_0_limit_200.json similarity index 100% rename from src/test/resources/com/cloudbees/jenkins/plugins/bitbucket/server/payload/1.0-projects-amuniz-repos-test-repos-branches_filterText_release_2Frelease-1.json rename to src/test/resources/com/cloudbees/jenkins/plugins/bitbucket/server/payload/1.0-projects-amuniz-repos-test-repos-branches_filterText_release_2Frelease-1_start_0_limit_200.json diff --git a/src/test/resources/com/cloudbees/jenkins/plugins/bitbucket/server/payload/1.0-projects-amuniz-repos-test-repos-tags_filterText_special-_22_24_3B_3E_3C_26_23__3D_40_21_7C._2C_2Ftest.json b/src/test/resources/com/cloudbees/jenkins/plugins/bitbucket/server/payload/1.0-projects-amuniz-repos-test-repos-tags_filterText_special-_22_24_3B_3E_3C_26_23__3D_40_21_7C._2C_2Ftest_start_0_limit_200.json similarity index 91% rename from src/test/resources/com/cloudbees/jenkins/plugins/bitbucket/server/payload/1.0-projects-amuniz-repos-test-repos-tags_filterText_special-_22_24_3B_3E_3C_26_23__3D_40_21_7C._2C_2Ftest.json rename to src/test/resources/com/cloudbees/jenkins/plugins/bitbucket/server/payload/1.0-projects-amuniz-repos-test-repos-tags_filterText_special-_22_24_3B_3E_3C_26_23__3D_40_21_7C._2C_2Ftest_start_0_limit_200.json index b25d2c9bb..aabc69350 100644 --- a/src/test/resources/com/cloudbees/jenkins/plugins/bitbucket/server/payload/1.0-projects-amuniz-repos-test-repos-tags_filterText_special-_22_24_3B_3E_3C_26_23__3D_40_21_7C._2C_2Ftest.json +++ b/src/test/resources/com/cloudbees/jenkins/plugins/bitbucket/server/payload/1.0-projects-amuniz-repos-test-repos-tags_filterText_special-_22_24_3B_3E_3C_26_23__3D_40_21_7C._2C_2Ftest_start_0_limit_200.json @@ -1,6 +1,6 @@ { "size": 1, - "limit": 25, + "limit": 200, "isLastPage": true, "values": [ { @@ -11,5 +11,6 @@ "latestChangeset": "046d9a3c1532acf4cf08fe93235c00e4d673c1d2", "hash": "c7208aca6fa205f115585be56a817f0cf2a43e62" } - ] + ], + "start": 0 } diff --git a/src/test/resources/com/cloudbees/jenkins/plugins/bitbucket/server/payload/1.0-projects-amuniz-repos-test-repos-tags_filterText_v0.0.0.json b/src/test/resources/com/cloudbees/jenkins/plugins/bitbucket/server/payload/1.0-projects-amuniz-repos-test-repos-tags_filterText_v0.0.0_start_0_limit_200.json similarity index 95% rename from src/test/resources/com/cloudbees/jenkins/plugins/bitbucket/server/payload/1.0-projects-amuniz-repos-test-repos-tags_filterText_v0.0.0.json rename to src/test/resources/com/cloudbees/jenkins/plugins/bitbucket/server/payload/1.0-projects-amuniz-repos-test-repos-tags_filterText_v0.0.0_start_0_limit_200.json index cee584975..f3387e489 100644 --- a/src/test/resources/com/cloudbees/jenkins/plugins/bitbucket/server/payload/1.0-projects-amuniz-repos-test-repos-tags_filterText_v0.0.0.json +++ b/src/test/resources/com/cloudbees/jenkins/plugins/bitbucket/server/payload/1.0-projects-amuniz-repos-test-repos-tags_filterText_v0.0.0_start_0_limit_200.json @@ -1,6 +1,6 @@ { "size": 1, - "limit": 25, + "limit": 200, "isLastPage": true, "values": [ {