// GET: GitSetup/Details/5 public ActionResult Details(int id) { var model = db.GitSetup.FirstOrDefault(i => i.Id == id); var gitSharpClient = new GitSharpClient(model.RepositoryPath); ViewBag.CurrentBranch = gitSharpClient.CurrentBranch().FriendlyName; ViewBag.LastTag = gitSharpClient.LastTag(); ViewBag.LastModify = gitSharpClient.LastModify(); ViewBag.Status = gitSharpClient.Status(); return(Edit(id)); }
private void InsertGitPanel(ref string htmlPanel, int projectId) { var gitList = db.GitSetup.Where(g => g.ProjectId == projectId); foreach (var gitSetup in gitList) { var gitClient = new GitSharpClient(gitSetup.RepositoryPath); var template = string.Format(PanelDashboardTemplate(), "<img src='../../Images/logoGIT.png' width=45px height:35px></img>", "<h5 style='word-wrap: break-word'><b>To clone:</b> " + gitSetup.Description + "</h5>" + "<h5 style='word-wrap: break-word'><b>Last modify:</b> " + gitClient.LastModify() + "</h5>"); htmlPanel += template; } }