Skip to content

Commit 86d252c

Browse files
author
Antonio Mansilla
authored
Merge pull request #38 from MaksTuev/JENKINS-49902-fix-extract-bitbucket-repository-name-from-repo-URI
JENKINS-49902 remove last slash from repo url
2 parents 018731a + 5e6b956 commit 86d252c

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)