Example #1
0
        public Build GetBuildBySourceVersion(TFSAdvanced.Models.DTO.Repository repository, string commitId)
        {
            var build = base.GetList(b => b.SourceCommit == commitId).OrderByDescending(b => b.Id).FirstOrDefault();

            if (build == null)
            {
                var repositoryBuilds = base.GetList(b => b.Repository?.Id == repository.Id).ToList();
                foreach (var repositoryBuild in repositoryBuilds)
                {
                    if (repositoryBuild.SourceCommit == commitId)
                    {
                        build = repositoryBuild;
                    }
                }
            }
            return(build);
        }
 protected virtual IList <TFSAdvanced.Updater.Models.PullRequests.PullRequest> GetPullRequests(Repository repository)
 {
     return(GetAsync.FetchResponseList <TFSAdvanced.Updater.Models.PullRequests.PullRequest>(RequestData, repository.PullRequestUrl, Logger).Result);
 }