diff --git a/pom.xml b/pom.xml index be31d850..a223e1ae 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ bitbucket - 1.1.12-SNAPSHOT + 1.1.13-SNAPSHOT hpi Jenkins Bitbucket Plugin integrate Jenkins with BitBucket. diff --git a/src/main/java/com/cloudbees/jenkins/plugins/BitbucketJobProbe.java b/src/main/java/com/cloudbees/jenkins/plugins/BitbucketJobProbe.java index 67295a11..e82a46b7 100644 --- a/src/main/java/com/cloudbees/jenkins/plugins/BitbucketJobProbe.java +++ b/src/main/java/com/cloudbees/jenkins/plugins/BitbucketJobProbe.java @@ -98,10 +98,15 @@ private boolean match(SCM scm, URIish url) { if (StringUtils.isEmpty(url.getHost())) { urIish = urIish.setHost(url.getHost()); } - + LOGGER.log(Level.FINE, "Trying to match {0} ", urIish.toString() + "<-->" + url.toString()); if (GitStatus.looselyMatches(urIish, url)) { return true; + } else if ( urIish.getPath().endsWith(".git.git")){ + LOGGER.log(Level.FINE, "Repo ends with .git.git, removing last .git"); + urIish = urIish.setPath(urIish.getPath().substring(0,urIish.getPath().length()-4)); + LOGGER.log(Level.FINE, "Trying to match {0} ", urIish.toString() + "<-->" + url.toString()); + return GitStatus.looselyMatches(urIish, url); } } }