private async Task <IEnumerable <PullRequest> > GetPullRequests(VSTSRepository repositoryInfo, VSTSProject project)
        {
            var query = PullRequestQuery.New(Input.Query.StartDate)
                        .WithFilter(p => p.CreationDate >= Input.Query.StartDate && p.CreationDate <= Input.Query.EndDate)
                        .WithParameter("status", "all");

            return(await _vstsRepository.GetPullRequests(project.Name, repositoryInfo.Name, query));
        }
Beispiel #2
0
        public async Task OnGet(Guid?id)
        {
            if (!id.HasValue)
            {
                Repository = new VSTSRepository {
                    Id = Guid.NewGuid()
                };
                return;
            }

            var repository = await _repository.GetSingleAsync <VSTSRepository>(r => r.Id == id.Value);

            if (repository == null)
            {
                Repository = new VSTSRepository {
                    Id = Guid.NewGuid()
                };
                return;
            }

            Repository = repository;
        }
Beispiel #3
0
 public VSTSProject GetProjectFor(VSTSRepository repo)
 {
     return(Projects.SingleOrDefault(p => p.Id == repo.Project));
 }