public IEnumerable <Branch> GetBranches(string url, string repository) { return(_branchService.Get(url, repository).Select(b => new Branch { Name = b.Name })); }
public IEnumerable <Comment> GetComments(string url, string repository, int pullRequestNumber) { return(_commentService.Get(url.Replace("REPOSITORY", repository) + "/" + pullRequestNumber + "/comments", repository).Select(p => new Comment { DateCreated = p.DateCreated, User = new User { Name = p.User.Name, Avatar = p.User.Avatar }, Body = p.Body })); }
public IEnumerable <PullRequest> GetPullRequests(string url, string repository) { return (_pullRequestService.Get(url.Replace("REPOSITORY", repository), repository).Select(p => new PullRequest { Repository = repository, Number = p.Number, Title = p.Title, CreatedOn = p.CreatedOn, UpdatedOn = p.UpdatedOn, AuthorName = p.User.Name, AuthorAvatar = p.User.Avatar, Comments = GetComments(url, repository, p.Number) })); }