Exemplo n.º 1
0
 internal PullRequestManager(Models.GitHub.PullRequest pullRequest, PullRequestData data)
 {
     PullRequest       = pullRequest;
     this.data         = data;
     ReviewRepository  = new ReviewRepository(data);
     CommentRepository = new CommentRepository(data);
 }
Exemplo n.º 2
0
        public async Task <PullRequestManager> GetExistPullRequestManagerAsync(string repName, int pullRequestNumber)
        {
            var owner       = (await client.User.Current()).Login;
            var data        = new PullRequestData(client, owner, repName, pullRequestNumber);
            var pullRequest = await GetPullRequestAsync(data);

            return(new PullRequestManager(pullRequest, data));
        }
Exemplo n.º 3
0
        private async Task <Models.GitHub.PullRequest> GetPullRequestAsync(PullRequestData data)
        {
            var pullRequest = await client?.PullRequest.Get(data.owner, data.repName, data.pullRequestNumber);

            var commits = await client?.PullRequest.Commits(data.owner, data.repName, data.pullRequestNumber);

            var reviewRep = new ReviewRepository(data);
            var reviews   = await reviewRep.GetAllReviewAsync();

            return(pullRequest.ToPullRequest(commits.ToCommits(), reviews, data.repName));
        }
Exemplo n.º 4
0
 internal ReviewRepository(PullRequestData data)
 {
     this.data = data;
 }
Exemplo n.º 5
0
 internal CommentRepository(PullRequestData data)
 {
     this.data = data;
 }