Ejemplo n.º 1
0
 public PullRequestEventHandler(SophiaDbContext SophiaDbContext,
                                GitHubRepositoryPullRequestService gitHubRepositoryPullRequestService,
                                ILogger <PullRequestEventHandler> logger)
 {
     _gitHubRepositoryPullRequestService = gitHubRepositoryPullRequestService;
     _SophiaDbContext = SophiaDbContext;
     _logger          = logger;
 }
Ejemplo n.º 2
0
 public PullRequestGatheringStep(SophiaDbContext dbContext, GitHubRepositoryPullRequestService gitHubRepositoryPullRequestService, GitHubOption gitHubOption)
     : base(dbContext)
 {
     _gitHubRepositoryPullRequestService = gitHubRepositoryPullRequestService;
     _gitHubOption = gitHubOption;
 }
Ejemplo n.º 3
0
        private async Task AnalyzePullRequests(long subscriptionId, SophiaDbContext dbContext, GitHubOption gitHubOption, GitHubRepositoryPullRequestService gitHubRepositoryPullRequestService)
        {
            try
            {
                var analyzer = new PullRequestAnalyzer(dbContext, gitHubOption, gitHubRepositoryPullRequestService);
                await analyzer.Analyze(subscriptionId);

                await dbContext.SaveChangesAsync();
            }
            catch (Exception e)
            {
                _logger.LogError("ApplyPullRequestsJob: Exception {exception} in {subscriptionId}", e.ToString(), subscriptionId);
                throw;
            }
        }
Ejemplo n.º 4
0
 public PullRequestAnalyzer(SophiaDbContext dbContext, GitHubOption gitHubOption, GitHubRepositoryPullRequestService gitHubRepositoryPullRequestService)
 {
     _dbContext    = dbContext;
     _gitHubOption = gitHubOption;
     _gitHubRepositoryPullRequestService = gitHubRepositoryPullRequestService;
 }