mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-14 17:26:22 +01:00
fix wrong compare urls for github and bitbucket
This commit is contained in:
@@ -99,24 +99,6 @@ public abstract class AbstractCompareUrlBuilder implements CompareUrlBuilder
|
||||
other.getVersion());
|
||||
}
|
||||
|
||||
//~--- get methods ----------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
*
|
||||
* @param url
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean isCompareable(String url)
|
||||
{
|
||||
return url.contains(getServername());
|
||||
}
|
||||
|
||||
//~--- methods --------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
@@ -127,7 +109,7 @@ public abstract class AbstractCompareUrlBuilder implements CompareUrlBuilder
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private String createCompareUrl(String urlString, String version,
|
||||
public String createCompareUrl(String urlString, String version,
|
||||
String otherVersion)
|
||||
{
|
||||
String result = null;
|
||||
@@ -139,6 +121,8 @@ public abstract class AbstractCompareUrlBuilder implements CompareUrlBuilder
|
||||
|
||||
if (Util.isNotEmpty(path))
|
||||
{
|
||||
path = HttpUtil.getUriWithoutStartSeperator(path);
|
||||
|
||||
String[] parts = path.split(HttpUtil.SEPARATOR_PATH);
|
||||
|
||||
if (parts.length >= 2)
|
||||
@@ -155,4 +139,20 @@ public abstract class AbstractCompareUrlBuilder implements CompareUrlBuilder
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
//~--- get methods ----------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
*
|
||||
* @param url
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean isCompareable(String url)
|
||||
{
|
||||
return url.contains(getServername());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user