示例#1
0
        public IActionResult Create(string reference, string path, string name)
        {
            if (ModelState.IsValid)
            {
                gitCloneServices.GitClone(reference, path);
                gitInitService.GitInit(path);
                var repos = new Repos
                {
                    Name = name,
                    Path = path
                };

                _context.Add(repos);
                _context.SaveChanges();

                var analysis = new Analysis
                {
                    Date  = DateTime.Now,
                    Repos = _context.Repos.SingleOrDefault(x => x.Id == repos.Id)
                };

                _context.Add(analysis);
                _context.SaveChanges();
                int    RepoId     = repos.Id;
                string Path       = path;
                int    AnalysisId = analysis.Id;
                counterChange.CounterChangeFileInLocalrepositiry(RepoId, Path, AnalysisId);
            }

            return(View("Index"));
        }
示例#2
0
        public IActionResult GitClone(string reference, string path)
        {
            gitCloneServices.GitClone(reference, path);

            return(RedirectToAction("Index"));
        }