public IActionResult Commit(int id, string commitId)
        {
            using (var context = new DatabaseController(Context, Configuration))
            {
                ViewData["ProjectId"]   = id;
                ViewData["ProjectName"] = context.GetProjectName(id);
            }

            using (var context = new RepositoriesContext(Context, Configuration, new RepositoryManager()))
            {
                var items = context.GetCommitDetailsRaw(new IncomingIdRequest
                {
                    Phase     = commitId,
                    ProjectId = id,
                });
                ViewData["CommitDetails"] = items;
                // Program.AccountEditorPages.Add(new(User.ToString(), items));
                //  ViewBag["CommitDetails"] = items;
            }

            using (var context = new WorkItemsContext(Context, Configuration))
                ViewData["WorkItemTypes"] = context.GetAllWorkItemTypes();

            ViewData["CommitId"] = commitId;
            ViewData["IsEmpty"]  = true;
            return(View());
        }
        public List <Branches> GetBranchesByProjectId(int projectId)
        {
            var branches = new List <Branches>();

            using (var context = new RepositoriesContext(Context, Configuration, new RepositoryManager()))
            {
                branches = context.GetBranchesGit(projectId);
            }

            return(branches);
        }
        public List <OutgoingCommitTemp> GetCommitsForBranch([FromBody] IncomingIdRequest request)
        {
            var branch = request.Phase;

            //We set the branch to default to master potential to fail with github anti racism bullshit
            if (string.IsNullOrEmpty(branch))
            {
                branch = "master";
            }

            var relationships = new List <OutgoingCommitTemp>();

            using (var context = new RepositoriesContext(Context, Configuration, new RepositoryManager()))
                relationships = context.GetCommitsForProject(request.ProjectId, branch);

            return(relationships);
        }
 public RepositoriesController(RepositoriesContext context)
 {
     _context = context;
 }
示例#5
0
 public ClientRepository(RepositoriesContext context)
 {
     _context = context;
 }
 public WebsiteRepositoty(RepositoriesContext context)
 {
     _context = context;
 }