public ActionResult Index(RepositorySearch repositorySearch) { AltinnStudioViewModel model = new AltinnStudioViewModel(); SearchResults repositorys = _giteaApi.SearchRepository(repositorySearch.OnlyAdmin, repositorySearch.KeyWord, repositorySearch.Page).Result; if (repositorys != null) { model.Repositories = repositorys.Data; if (model.Repositories != null) { foreach (Repository repo in model.Repositories) { repo.IsClonedToLocal = _sourceControl.IsLocalRepo(repo.Owner.Login, repo.Name); } } } if (repositorySearch.OnlyLocalRepositories) { model.Repositories = model.Repositories.FindAll(r => r.IsClonedToLocal); } model.RepositorySearch = repositorySearch; // IList<OrgConfiguration> owners = _repository.GetOwners(); return(View(model)); }
public List <Repository> Search(RepositorySearch repositorySearch) { SearchResults repositorys = _giteaApi.SearchRepository(repositorySearch.OnlyAdmin, repositorySearch.KeyWord, repositorySearch.Page).Result; return(repositorys.Data); }
public async Task <List <RepositoryModel> > Search(RepositorySearch repositorySearch) { SearchResults repositories = await _giteaApi.SearchRepository(repositorySearch.OnlyAdmin, repositorySearch.KeyWord, repositorySearch.Page); return(repositories.Data); }