Skip to content

Commit bece139

Browse files
authored
[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 c41eb36 commit bece139

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,8 @@ public BitbucketServerBranch getTag(@NonNull String tagName) throws IOException,
562562
.set("owner", getUserCentricOwner())
563563
.set("repo", repositoryName)
564564
.set("tagName", tagName)
565-
.expand();
565+
.expand()
566+
.replace("%2F", "/");
566567

567568
String response = getRequest(url);
568569
BitbucketServerBranch tag = JsonParser.toJava(response, BitbucketServerBranch.class);

0 commit comments

Comments
 (0)