Skip to content

Commit 43a84d7

Browse files
committed
JENKINS-49902 remove last slash from repo url
1 parent 469f1f8 commit 43a84d7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/java/org/jenkinsci/plugins/bitbucket/BitbucketBuildStatusHelper.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@ private static List<BitbucketBuildStatusResource> createBuildStatusResources(fin
9696

9797
// expand parameters on repo url
9898
String repoUrl = build.getEnvironment(new LogTaskListener(logger, Level.INFO)).expand(repoUri.getPath());
99+
if (repoUrl.endsWith("/")) {
100+
//fix JENKINS-49902
101+
repoUrl = repoUrl.substring(0, repoUrl.length() - 1);
102+
}
99103

100104
// extract bitbucket user name and repository name from repo URI
101105
String repoName = repoUrl.substring(

0 commit comments

Comments
 (0)