Skip to content

Commit

Permalink
Merge pull request #75 from tzachs/master
Browse files Browse the repository at this point in the history
Added support to detect trigger for repos that end with .git
  • Loading branch information
tzachs authored Jul 23, 2020
2 parents 362c8d4 + 377b41f commit d605457
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</parent>

<artifactId>bitbucket</artifactId>
<version>1.1.12-SNAPSHOT</version>
<version>1.1.13-SNAPSHOT</version>
<packaging>hpi</packaging>
<name>Jenkins Bitbucket Plugin</name>
<description>integrate Jenkins with BitBucket.</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Expand Down

0 comments on commit d605457

Please sign in to comment.