#16 -- Checkout specific branch
This commit is contained in:
parent
99415a1a22
commit
14a7983f49
@ -32,6 +32,7 @@ import static org.apache.logging.log4j.util.Strings.isBlank;
|
|||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class GitRepositoryService {
|
public class GitRepositoryService {
|
||||||
|
private static final String BRANCH_PREFIX = "refs/remotes/origin/";
|
||||||
@Value("${extractor.custom-projects-dir}")
|
@Value("${extractor.custom-projects-dir}")
|
||||||
private String customProjectsDir;
|
private String customProjectsDir;
|
||||||
|
|
||||||
@ -207,7 +208,7 @@ public class GitRepositoryService {
|
|||||||
return git.branchList().setListMode(ListBranchCommand.ListMode.REMOTE)
|
return git.branchList().setListMode(ListBranchCommand.ListMode.REMOTE)
|
||||||
.call()
|
.call()
|
||||||
.stream()
|
.stream()
|
||||||
.map(r -> new Branch(r.getName()))
|
.map(r -> new Branch(r.getName().replace(BRANCH_PREFIX, "")))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user