public ActionResult Tags(Guid id, string encodedName, int page = 1) { page = page >= 1 ? page : 1; ViewBag.ShowShortMessageOnly = true; var repo = RepositoryRepository.GetRepository(id); ViewBag.ID = id; ViewBag.Name = repo.Name; ViewBag.GitUrl = GitUrl(repo.Name); using (var browser = new RepositoryBrowser(Path.Combine(UserConfiguration.Current.Repositories, repo.Name))) { var name = PathEncoder.Decode(encodedName); string referenceName; int totalCount; var commits = browser.GetTags(name, page, 10, out referenceName, out totalCount); PopulateBranchesData(browser, referenceName); ViewBag.TotalCount = totalCount; return(View(new RepositoryCommitsModel { Commits = commits, Name = repo.Name, Logo = new RepositoryLogoDetailModel(repo.Logo) })); } }
private void PopulateBranchesData(RepositoryBrowser browser, string referenceName) { ViewData["referenceName"] = referenceName; ViewData["branches"] = browser.GetBranches(); ViewData["tags"] = browser.GetTags(); RepositoryCommitModel model = browser.GetCommitDetail(referenceName); ViewData["CommitCount"] = model == null ? 0 : model.Changes.ToList().Count; }
private void PopulateBranchesData(RepositoryBrowser browser, string referenceName) { ViewData["referenceName"] = referenceName; ViewData["branches"] = browser.GetBranches(); ViewData["tags"] = browser.GetTags(); }
private void PopulateBranchesData(RepositoryBrowser browser, string referenceName) { ViewData["referenceName"] = referenceName; ViewData["branches"] = browser.GetBranches(); ViewData["tags"] = browser.GetTags(); }
public ActionResult Tags(Guid id, string encodedName, int page = 1) { page = page >= 1 ? page : 1; ViewBag.ID = id; ViewBag.ShowShortMessageOnly = true; var repo = RepositoryRepository.GetRepository(id); using (var browser = new RepositoryBrowser(Path.Combine(UserConfiguration.Current.Repositories, repo.Name))) { var name = PathEncoder.Decode(encodedName); string referenceName; int totalCount; var commits = browser.GetTags(name, page, 10, out referenceName, out totalCount); PopulateBranchesData(browser, referenceName); ViewBag.TotalCount = totalCount; return View(new RepositoryCommitsModel { Commits = commits, Name = repo.Name, Logo = new RepositoryLogoDetailModel(repo.Logo) }); } }