class ComponentRepoServiceImpl implements ComponentRepoService {

	@Override
	public Page<ComponentRepoInfo> findAllByGitRepoName(String queryGitRepoName, Pageable page) {
		String version = "master";
		if(StringUtils.isBlank(queryGitRepoName)) {
			return Page.empty();
		}
		
		List<String> stdRepos = findAllStdGitRepo();
		return componentRepoDao.findAllByGitRepoNameContainingIgnoreCase(queryGitRepoName, page).map(componentRepo -> {
			userService.findById(componentRepo.getCreateUserId()).ifPresent(user -> {
				componentRepo.setCreateUserName(user.getLoginName());
				componentRepo.setCreateUserAvatarUrl(user.getAvatarUrl());
			});
			
			componentRepo.setStd(stdRepos.stream().anyMatch(gitUrl -> gitUrl.equals(componentRepo.getGitRepoUrl())));
			return getComponentRepoVersionAndApiRepoVersion(version, componentRepo, stdRepos);
		});
	}

}