#92 -- Fix .git removing for git

This commit is contained in:
Anton Romanov 2023-02-21 14:43:27 +04:00
parent 513c2cb7ba
commit bc58d72481

View File

@ -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