Skip to content

Commit 96500a5

Browse files
committed
[JENKINS-75400] Building tags containing slashes is broken for Bitbucket Data Center (#1005)
Fix encoding of the URL for the single tag endpoint. Tag name must be encoded but slash chars.
1 parent b33c56d commit 96500a5

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,8 @@ public BitbucketServerBranch getTag(@NonNull String tagName) throws IOException,
560560
.set("owner", getUserCentricOwner())
561561
.set("repo", repositoryName)
562562
.set("tagName", tagName)
563-
.expand();
563+
.expand()
564+
.replace("%2F", "/");
564565

565566
String response = getRequest(url);
566567
BitbucketServerBranch tag = JsonParser.toJava(response, BitbucketServerBranch.class);

0 commit comments

Comments
 (0)