Beispiel #1
0
        internal GithubPullRequestInformation(string issueOwner, string repoName, PullRequest pullRequestDetails, GithubPlugin plugin)
        {
            _pullRequestDetails = pullRequestDetails;
            _plugin             = plugin;

            Owner          = pullRequestDetails.User.Login;
            Created        = pullRequestDetails.Created;
            Title          = pullRequestDetails.Title;
            Body           = pullRequestDetails.Body;
            Id             = pullRequestDetails.Number.ToString();
            IssueOwner     = issueOwner;
            RepositoryName = repoName;

            BaseRepo = GithubHostedRepository.Convert(_plugin, _pullRequestDetails.Base.Repository);
            BaseSha  = _pullRequestDetails.Base.Sha;
            BaseRef  = _pullRequestDetails.Base.Ref;
            HeadRepo = GithubHostedRepository.Convert(_plugin, _pullRequestDetails.Head.Repository);
            HeadSha  = _pullRequestDetails.Head.Sha;
            HeadRef  = _pullRequestDetails.Head.Ref;
        }
Beispiel #2
0
        public IList <IHostedRepository> GetRepositoriesOfUser(string user)
        {
            var repoApi = GetRepositoryApi();

            return(repoApi.List(user).Select(r => GithubHostedRepository.Convert(this, r)).Cast <IHostedRepository>().ToList());
        }
Beispiel #3
0
        public IHostedRepository GetRepository(string user, string repositoryName)
        {
            var repoApi = GetRepositoryApi();

            return(GithubHostedRepository.Convert(this, repoApi.Get(user, repositoryName)));
        }
Beispiel #4
0
        public IList <IHostedRepository> SearchForRepository(string search)
        {
            var repoApi = GetRepositoryApi();

            return(repoApi.Search(search).Select(r => GithubHostedRepository.Convert(this, r)).Cast <IHostedRepository>().ToList());
        }