public RepositoryMediator(IRemoteRepositoryState repositoryState, IBranchSettings branchSettings, IBranchIterationMediator branchIteration, IGitServiceApi gitApi, IOrchestrationActions actions) { this.repositoryState = repositoryState; this.branchSettings = branchSettings; this.branchIteration = branchIteration; this.gitApi = gitApi; this.actions = actions; }
public IntegrateBranchesOrchestration(IGitServiceApi gitServiceApi, IUnitOfWorkFactory workFactory, IRepositoryOrchestration orchestration, IIntegrationNamingMediator integrationNaming, IBranchSettings settings, IRepositoryMediator repository, IBranchIterationMediator branchIteration) { this.gitServiceApi = gitServiceApi; this.workFactory = workFactory; this.orchestration = orchestration; this.integrationNaming = integrationNaming; this.settings = settings; this.repository = repository; this.branchIteration = branchIteration; }
public Loaders(IDataLoaderContextAccessor loadContextAccessor, IBranchSettingsAccessor branchSettings, IUserPermissionAccessor permissionAccessor, IRemoteRepositoryState repositoryState, IBranchIterationNamingConvention branchIteration, IGitServiceApi gitService, ILoggerFactory loggerFactory) { this.logger = loggerFactory.CreateLogger <Loaders>(); this.loadContext = loadContextAccessor.LoadContext; this.branchSettings = branchSettings; this.permissionAccessor = permissionAccessor; this.repositoryState = repositoryState; this.branchIteration = branchIteration; this.gitService = gitService; }
public MergeDownstreamActionProcess(IGitCli cli, IGitServiceApi gitServiceApi, IUnitOfWorkFactory workFactory, IRepositoryOrchestration orchestration, IRepositoryMediator repository, IntegrateBranchesOrchestration integrateBranches, IBranchIterationMediator branchIteration, string downstreamBranch, IOptions <GitRepositoryOptions> options, IMergeStrategyManager strategyManager) { this.cli = cli; this.gitServiceApi = gitServiceApi; this.integrateBranches = integrateBranches; this.repository = repository; this.orchestration = orchestration; this.branchIteration = branchIteration; this.downstreamBranchGroup = downstreamBranch; this.detailsTask = repository.GetBranchDetails(downstreamBranch).FirstAsync().ToTask(); this.latestBranchName = detailsTask.ContinueWith(task => repository.LatestBranchName(task.Result).FirstOrDefaultAsync().ToTask()).Unwrap(); this.strategyTask = detailsTask.ContinueWith(task => strategyManager.GetMergeStrategy(task.Result)); this.isReadOnly = options.Value.ReadOnly; this.workFactory = workFactory; }
public MergeNextIterationMergeStrategy(NormalMergeStrategy normalStrategy, IGitCli cli, IGitServiceApi gitServiceApi) { this.normalStrategy = normalStrategy; this.cli = cli; this.gitServiceApi = gitServiceApi; }
public static Task <bool> HasOpenPullRequest(this IGitServiceApi api, string targetBranch = null, string sourceBranch = null) { return(api.GetPullRequests(state: PullRequestState.Open, targetBranch: targetBranch, sourceBranch: sourceBranch).ContinueWith(t => t.Result.Count > 0)); }
private Task <string> BranchUrl([Source] GitRef gitRef, [FromServices] IGitServiceApi gitApi) { return(gitApi.GetBranchUrl(gitRef.Name)); }