Skip to content

Commit 30be8c1

Browse files
Seroslifeofguenter
andauthored
Fix endless loop when fetching branch by filterText from Bitbucket Server API (#737)
* fix endless loop when fetching branch by filterText from Bitbucket Server API * fix endless loop when fetching tag by filterText from Bitbucket Server API --------- Co-authored-by: Günter Grodotzki <[email protected]>
1 parent 6710d1c commit 30be8c1

7 files changed

+6
-5
lines changed

src/main/java/com/cloudbees/jenkins/plugins/bitbucket/server/client/BitbucketServerAPIClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,9 @@ public class BitbucketServerAPIClient implements BitbucketApi {
139139
private static final String API_REPOSITORY_PATH = API_BASE_PATH + "/projects/{owner}/repos/{repo}";
140140
private static final String API_DEFAULT_BRANCH_PATH = API_REPOSITORY_PATH + "/branches/default";
141141
private static final String API_BRANCHES_PATH = API_REPOSITORY_PATH + "/branches{?start,limit}";
142-
private static final String API_BRANCHES_FILTERED_PATH = API_REPOSITORY_PATH + "/branches{?filterText}";
142+
private static final String API_BRANCHES_FILTERED_PATH = API_REPOSITORY_PATH + "/branches{?filterText,start,limit}";
143143
private static final String API_TAGS_PATH = API_REPOSITORY_PATH + "/tags{?start,limit}";
144-
private static final String API_TAGS_FILTERED_PATH = API_REPOSITORY_PATH + "/tags{?filterText}";
144+
private static final String API_TAGS_FILTERED_PATH = API_REPOSITORY_PATH + "/tags{?filterText,start,limit}";
145145
private static final String API_PULL_REQUESTS_PATH = API_REPOSITORY_PATH + "/pull-requests{?start,limit,at,direction,state}";
146146
private static final String API_PULL_REQUEST_PATH = API_REPOSITORY_PATH + "/pull-requests/{id}";
147147
private static final String API_PULL_REQUEST_MERGE_PATH = API_REPOSITORY_PATH + "/pull-requests/{id}/merge";
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"size": 1,
3-
"limit": 25,
3+
"limit": 200,
44
"isLastPage": true,
55
"values": [
66
{
@@ -11,5 +11,6 @@
1111
"latestChangeset": "046d9a3c1532acf4cf08fe93235c00e4d673c1d2",
1212
"hash": "c7208aca6fa205f115585be56a817f0cf2a43e62"
1313
}
14-
]
14+
],
15+
"start": 0
1516
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"size": 1,
3-
"limit": 25,
3+
"limit": 200,
44
"isLastPage": true,
55
"values": [
66
{

0 commit comments

Comments
 (0)