Skip to content

Commit 4eb776e

Browse files
author
Antonio Mansilla
authored
Merge pull request #32 from notrix/master
[BUGFIX] for username same as repository name
2 parents a14a460 + 2402c12 commit 4eb776e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,16 +104,16 @@ private static List<BitbucketBuildStatusResource> createBuildStatusResources(fin
104104
);
105105

106106
if (repoName.isEmpty()) {
107-
logger.log(Level.INFO, "Bitbucket build notifier could not extract the repository name from the repository URL");
107+
logger.log(Level.INFO, "Bitbucket build notifier could not extract the repository name from the repository URL: " + repoUrl);
108108
continue;
109109
}
110110

111-
String userName = repoUrl.substring(0, repoUrl.indexOf("/" + repoName));
111+
String userName = repoUrl.substring(0, repoUrl.lastIndexOf("/" + repoName));
112112
if (userName.contains("/")) {
113113
userName = userName.substring(userName.indexOf("/") + 1, userName.length());
114114
}
115115
if (userName.isEmpty()) {
116-
logger.log(Level.INFO, "Bitbucket build notifier could not extract the user name from the repository URL");
116+
logger.log(Level.INFO, "Bitbucket build notifier could not extract the user name from the repository URL: " + repoUrl + " with repository name: " + repoName);
117117
continue;
118118
}
119119

0 commit comments

Comments
 (0)