public SubmissionsController(ISprintService sprint, IPermissionService permission, ICommitService commit, ISubmissionService submission, IErrorHandlerService errorHandler, IJwtAuthService jwtAuth) : base(errorHandler, jwtAuth)
 {
     _sprint     = sprint;
     _permission = permission;
     _commit     = commit;
     _submission = submission;
 }
 public ListenersController(IConfigurationFileService configurationFile, IPipelineThreadService pipelineThread, IWorkflowThreadService workflowThread, ITokenService token, ICommitService commit, IErrorHandlerService errorHandler, IJwtAuthService jwtAuth) : base(errorHandler, jwtAuth)
 {
     _configurationFile = configurationFile;
     _pipelineThread    = pipelineThread;
     _workflowThread    = workflowThread;
     _token             = token;
     _commit            = commit;
 }
Exemplo n.º 3
0
 public Github(IUserService userService, IRepositoryService repositoryService, INetworkService networkService,
               IIssueService issueService, IObjectService objectService, ICommitService commitService)
 {
     Users = userService;
     Repositories = repositoryService;
     Networks = networkService;
     Issues = issueService;
     Objects = objectService;
     Commits = commitService;
 }
Exemplo n.º 4
0
        public static async Task <IReadOnlyList <Contribution> > Get(
            IReadOnlyCollection <CommitterGroup> committerGroups, ICommitService commitService)
        {
            Guard.AgainstNullArgument(nameof(committerGroups), committerGroups);
            Guard.AgainstNullArgument(nameof(commitService), commitService);

            return
                ((await Task.WhenAll(committerGroups.SelectMany(group => @group.RepositoryList.Select(id =>
            {
                log.InfoFormat("Getting commits for {@Repository}...", id);
                return commitService.Get(id.Owner, id.Name).ContinueWith(task =>
                {
                    if (task.Exception != null)
                    {
                        log.ErrorException("Failed to get commits for {@Repository}.", task.Exception.InnerException, id);
                        return Enumerable.Empty <Commit>();
                    }

                    log.InfoFormat("Got commits for {@Repository}.", id);
                    return task.Result;
                });
            }))))
                 .SelectMany(_ => _)
                 .SelectMany(commit => new[]
            {
                new { commit.Repository, Login = commit.Committer, commit.Committed.LocalDateTime },
                new { commit.Repository, Login = commit.Author, commit.Authored.LocalDateTime },
            })
                 .Distinct()
                 .GroupBy(contribution => new
            {
                Group = committerGroups.First(group => @group.RepositoryList.Contains(contribution.Repository)).Name,
                contribution.Login
            })
                 .Select(g => new Contribution(g.Key.Group, g.Key.Login, g.Sum(contribution => Score(contribution.LocalDateTime))))
                 .ToList());
        }
Exemplo n.º 5
0
        public static async Task<IReadOnlyList<Contribution>> Get(
            IReadOnlyCollection<CommitterGroup> committerGroups, ICommitService commitService)
        {
            Guard.AgainstNullArgument(nameof(committerGroups), committerGroups);
            Guard.AgainstNullArgument(nameof(commitService), commitService);

            return
                (await Task.WhenAll(committerGroups.SelectMany(group => @group.RepositoryList.Select(id =>
                    {
                        log.InfoFormat("Getting commits for {@Repository}...", id);
                        return commitService.Get(id.Owner, id.Name).ContinueWith(task =>
                        {
                            if (task.Exception != null)
                            {
                                log.ErrorException("Failed to get commits for {@Repository}.", task.Exception.InnerException, id);
                                return Enumerable.Empty<Commit>();
                            }

                            log.InfoFormat("Got commits for {@Repository}.", id);
                            return task.Result;
                        });
                    }))))
                .SelectMany(_ => _)
                .SelectMany(commit => new[]
                {
                    new { commit.Repository, Login = commit.Committer, commit.Committed.LocalDateTime },
                    new { commit.Repository, Login = commit.Author, commit.Authored.LocalDateTime },
                })
                .Distinct()
                .GroupBy(contribution => new
                {
                    Group = committerGroups.First(group => @group.RepositoryList.Contains(contribution.Repository)).Name,
                    contribution.Login
                })
                .Select(g => new Contribution(g.Key.Group, g.Key.Login, g.Sum(contribution => Score(contribution.LocalDateTime))))
                .ToList();
        }
Exemplo n.º 6
0
 public CommitsController(ICommitService commit, IErrorHandlerService errorHandler, IJwtAuthService jwtAuth) : base(errorHandler, jwtAuth)
 {
     _commit = commit;
 }
Exemplo n.º 7
0
 public CommitsController(ICommitService commitService)
 {
     this.commitService = commitService;
 }
 /// <inheritdoc />
 public EventSourcedMoviesController(ICommitService commitService, IMovieBuilder movieBuilder, IMapper mapper)
 {
     _commitService = commitService;
     _movieBuilder  = movieBuilder;
     _mapper        = mapper;
 }
 public CommitsController(ICommitService commitService, IRepositoryService repositoryService, IValidator validator)
 {
     this.commitService     = commitService;
     this.repositoryService = repositoryService;
     this.validator         = validator;
 }
Exemplo n.º 10
0
 public CommitsController(ICommitService service)
 {
     this.service = service;
 }
Exemplo n.º 11
0
 public CommitsController(IHttpClientFactory httpClientFactory)
 {
     _commitService     = PlusEngine.Instance.Resolve <ICommitService>();
     _httpClientFactory = httpClientFactory;
 }
 public void Setup()
 {
     CommitRepository = GithubServiceLocator.Get<ICommitService>();
 }
Exemplo n.º 13
0
 public CommitController(ICommitService service)
 => _service = service;