public ObservablePullRequestReviewCommentsClient(IGitHubClient client)
        {
            Ensure.ArgumentNotNull(client, "client");

            _client = client.PullRequest.Comment;
            _connection = client.Connection;
        }
        public ObservablePullRequestReviewCommentsClient(IGitHubClient client)
        {
            Ensure.ArgumentNotNull(client, "client");

            _client     = client.PullRequest.Comment;
            _connection = client.Connection;
        }
示例#3
0
    public PullRequestReviewCommentsClientTests()
    {
        _github = Helper.GetAuthenticatedClient();

        _client = _github.PullRequest.Comment;

        // We'll create a pull request that can be used by most tests
        _context = _github.CreateRepositoryContext("test-repo").Result;
    }
    public PullRequestReviewCommentsClientTests()
    {
        _github = Helper.GetAuthenticatedClient();

        _client = _github.PullRequest.Comment;

        // We'll create a pull request that can be used by most tests
        _context = _github.CreateRepositoryContext("test-repo").Result;
    }
    public PullRequestReviewCommentsClientTests()
    {
        _gitHubClient = Helper.GetAuthenticatedClient();

        _client = _gitHubClient.PullRequest.Comment;

        // We'll create a pull request that can be used by most tests
        var repoName = Helper.MakeNameWithTimestamp("test-repo");
        _repository = CreateRepository(repoName).Result;
    }
    public PullRequestReviewCommentsClientTests()
    {
        _gitHubClient = Helper.GetAuthenticatedClient();

        _client = _gitHubClient.PullRequest.Comment;

        // We'll create a pull request that can be used by most tests
        var repoName = Helper.MakeNameWithTimestamp("test-repo");

        _repository = CreateRepository(repoName).Result;
    }
    public PullRequestReviewCommentsClientTests()
    {
        _gitHubClient = new GitHubClient(new ProductHeaderValue("OctokitTests"))
        {
            Credentials = Helper.Credentials
        };

        _client = _gitHubClient.PullRequest.Comment;

        // We'll create a pull request that can be used by most tests
        var repoName = Helper.MakeNameWithTimestamp("test-repo");
        _repository = CreateRepository(repoName).Result;
    }
    public PullRequestReviewCommentsClientTests()
    {
        _gitHubClient = new GitHubClient(new ProductHeaderValue("OctokitTests"))
        {
            Credentials = Helper.Credentials
        };

        _client = _gitHubClient.PullRequest.Comment;

        // We'll create a pull request that can be used by most tests
        var repoName = Helper.MakeNameWithTimestamp("test-repo");

        _repository = CreateRepository(repoName).Result;
    }
        /// <summary>
        /// Initializes a new instance of the <see cref="PullRequestCommenter"/> class.
        /// </summary>
        /// <param name="client">The <see cref="IPullRequestReviewCommentsClient"/> to use for making comments.</param>
        /// <param name="repository">The <see cref="GitHubRepository"/> containing the pull request to comment on.</param>
        protected PullRequestCommenter(IPullRequestReviewCommentsClient client, GitHubRepository repository)
        {
            if (client == null)
            {
                throw new ArgumentNullException("client");
            }

            if (repository == null)
            {
                throw new ArgumentNullException("repository");
            }

            this.client = client;
            this.repository = repository;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="PullRequestCommenterFactory"/> class.
        /// </summary>
        /// <param name="client">The <see cref="IPullRequestReviewCommentsClient"/> to use for interfacing with github.</param>
        /// <param name="repository">The <see cref="GitHubRepository"/> the pull requests are in.</param>
        /// <param name="diffRetriever">The <see cref="IGitHubDiffRetriever"/> to used to retrieve diffs.</param>
        public PullRequestCommenterFactory(
            IPullRequestReviewCommentsClient client,
            GitHubRepository repository,
            IGitHubDiffRetriever diffRetriever)
        {
            if (client == null)
            {
                throw new ArgumentNullException("client");
            }

            if (repository == null)
            {
                throw new ArgumentNullException("repository");
            }

            this.client = client;
            this.repository = repository;

            this.DiffRetriever = diffRetriever;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="RenamedPullRequestCommenter"/> class.
 /// </summary>
 /// <param name="client">The <see cref="IPullRequestReviewCommentsClient"/> to use for making comments.</param>
 /// <param name="repository">The <see cref="GitHubRepository"/> containing the pull request to comment on.</param>
 public RenamedPullRequestCommenter(IPullRequestReviewCommentsClient client, GitHubRepository repository)
     : base(client, repository)
 {
 }