WIP: страницы для правил #62
@ -3,6 +3,7 @@ package ru.ulstu.extractor.gitrepository.service;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import ru.ulstu.extractor.branch.model.Branch;
|
import ru.ulstu.extractor.branch.model.Branch;
|
||||||
import ru.ulstu.extractor.http.HttpService;
|
import ru.ulstu.extractor.http.HttpService;
|
||||||
|
import ru.ulstu.extractor.util.StringUtils;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class GithubApi implements GitApi {
|
public class GithubApi implements GitApi {
|
||||||
@ -41,7 +42,7 @@ public class GithubApi implements GitApi {
|
|||||||
@Override
|
@Override
|
||||||
public String getFormattedUrl(Branch branch, String template) {
|
public String getFormattedUrl(Branch branch, String template) {
|
||||||
String[] urlParts = branch.getGitRepository().getUrl().split("/");
|
String[] urlParts = branch.getGitRepository().getUrl().split("/");
|
||||||
return String.format(template, urlParts[3], urlParts[4]);
|
return String.format(template, urlParts[3], StringUtils.removeDotGit(urlParts[4]));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user