Skip to content

Commit 9a1c558

Browse files
tball-devjetersen
andcommitted
add max pagelen of 100 to /refs/branches call (#277)
Co-authored-by: Joseph Petersen <[email protected]>
1 parent 4baa6d7 commit 9a1c558

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/main/java/com/cloudbees/jenkins/plugins/bitbucket/client/BitbucketCloudApiClient.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,9 +479,10 @@ public List<BitbucketCloudBranch> getBranches() throws IOException, InterruptedE
479479
}
480480

481481
public List<BitbucketCloudBranch> getBranchesByRef(String nodePath) throws IOException, InterruptedException {
482-
String url = UriTemplate.fromTemplate(REPO_URL_TEMPLATE + nodePath)
482+
String url = UriTemplate.fromTemplate(REPO_URL_TEMPLATE + nodePath + "{?pagelen}")
483483
.set("owner", owner)
484484
.set("repo", repositoryName)
485+
.set("pagelen", MAX_PAGE_LENGTH)
485486
.expand();
486487
String response = getRequest(url);
487488
try {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"pagelen": 10,
2+
"pagelen": 100,
33
"values": [{
44
"name": "feature/BB-1",
55
"links": {

0 commit comments

Comments
 (0)