#92 -- Fix .git removing for git
This commit is contained in:
parent
513c2cb7ba
commit
bc58d72481
@ -3,6 +3,7 @@ package ru.ulstu.extractor.gitrepository.service;
|
||||
import org.springframework.stereotype.Service;
|
||||
import ru.ulstu.extractor.branch.model.Branch;
|
||||
import ru.ulstu.extractor.http.HttpService;
|
||||
import ru.ulstu.extractor.util.StringUtils;
|
||||
|
||||
@Service
|
||||
public class GithubApi implements GitApi {
|
||||
@ -41,7 +42,7 @@ public class GithubApi implements GitApi {
|
||||
@Override
|
||||
public String getFormattedUrl(Branch branch, String template) {
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user