From 7dd5c1094597ef08107f3d534eb34bd4aac2807a Mon Sep 17 00:00:00 2001 From: "aedampir@gmail.com" Date: Wed, 15 Jun 2016 18:23:17 +0700 Subject: [PATCH 1/9] modified XML docs --- ...PullRequestReviewCommentReactionsClient.cs | 7 +++++- ...PullRequestReviewCommentReactionsClient.cs | 11 ++++++--- ...PullRequestReviewCommentReactionsClient.cs | 24 ++++++++++++------- ...PullRequestReviewCommentReactionsClient.cs | 9 +++++-- 4 files changed, 36 insertions(+), 15 deletions(-) diff --git a/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentReactionsClient.cs b/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentReactionsClient.cs index 75cc0a8886..5aace37522 100644 --- a/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentReactionsClient.cs +++ b/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentReactionsClient.cs @@ -1,8 +1,13 @@ using System; -using System.Collections.Generic; namespace Octokit.Reactive { + /// + /// A client for GitHub's Reactions API. + /// + /// + /// See the Reactions API documentation for more information. + /// public interface IObservablePullRequestReviewCommentReactionsClient { /// diff --git a/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentReactionsClient.cs b/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentReactionsClient.cs index e917ef5a31..29bd3d826d 100644 --- a/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentReactionsClient.cs +++ b/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentReactionsClient.cs @@ -1,10 +1,15 @@ -using Octokit.Reactive.Internal; -using System; -using System.Collections.Generic; +using System; using System.Reactive.Threading.Tasks; +using Octokit.Reactive.Internal; namespace Octokit.Reactive { + /// + /// A client for GitHub's Reactions API. + /// + /// + /// See the Reactions API documentation for more information. + /// public class ObservablePullRequestReviewCommentReactionsClient : IObservablePullRequestReviewCommentReactionsClient { readonly IPullRequestReviewCommentReactionsClient _client; diff --git a/Octokit/Clients/IPullRequestReviewCommentReactionsClient.cs b/Octokit/Clients/IPullRequestReviewCommentReactionsClient.cs index 5c2c4dba2f..dc1f65404e 100644 --- a/Octokit/Clients/IPullRequestReviewCommentReactionsClient.cs +++ b/Octokit/Clients/IPullRequestReviewCommentReactionsClient.cs @@ -3,27 +3,33 @@ namespace Octokit { + /// + /// A client for GitHub's Reactions API. + /// + /// + /// See the Reactions API documentation for more information. + /// public interface IPullRequestReviewCommentReactionsClient { /// - /// Creates a reaction for a specified Pull Request Review Comment. + /// Get all reactions for a specified Pull Request Review Comment. /// - /// https://developer.github.com/v3/reactions/#create-reaction-for-a-pull-request-review-comment + /// https://developer.github.com/v3/reactions/#list-reactions-for-a-pull-request-review-comment /// The owner of the repository /// The name of the repository - /// The comment id - /// The reaction to create + /// The comment id /// - Task Create(string owner, string name, int number, NewReaction reaction); + Task> GetAll(string owner, string name, int number); /// - /// Get all reactions for a specified Pull Request Review Comment. + /// Creates a reaction for a specified Pull Request Review Comment. /// - /// https://developer.github.com/v3/reactions/#list-reactions-for-a-pull-request-review-comment + /// https://developer.github.com/v3/reactions/#create-reaction-for-a-pull-request-review-comment /// The owner of the repository /// The name of the repository - /// The comment id + /// The comment id + /// The reaction to create /// - Task> GetAll(string owner, string name, int number); + Task Create(string owner, string name, int number, NewReaction reaction); } } diff --git a/Octokit/Clients/PullRequestReviewCommentReactionsClient.cs b/Octokit/Clients/PullRequestReviewCommentReactionsClient.cs index 4c07dffa39..6cc9208808 100644 --- a/Octokit/Clients/PullRequestReviewCommentReactionsClient.cs +++ b/Octokit/Clients/PullRequestReviewCommentReactionsClient.cs @@ -1,9 +1,14 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Threading.Tasks; namespace Octokit { + /// + /// A client for GitHub's Reactions API. + /// + /// + /// See the Reactions API documentation for more information. + /// public class PullRequestReviewCommentReactionsClient : ApiClient, IPullRequestReviewCommentReactionsClient { public PullRequestReviewCommentReactionsClient(IApiConnection apiConnection) From c6ce11d7b4e7cf3517f1d2589812eda9f6a8e905 Mon Sep 17 00:00:00 2001 From: "aedampir@gmail.com" Date: Wed, 15 Jun 2016 18:24:28 +0700 Subject: [PATCH 2/9] reordered methods in interfaces and implementations --- ...PullRequestReviewCommentReactionsClient.cs | 18 +++++++------- ...PullRequestReviewCommentReactionsClient.cs | 24 +++++++++---------- ...PullRequestReviewCommentReactionsClient.cs | 24 +++++++++---------- 3 files changed, 33 insertions(+), 33 deletions(-) diff --git a/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentReactionsClient.cs b/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentReactionsClient.cs index 5aace37522..a23352ecc2 100644 --- a/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentReactionsClient.cs +++ b/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentReactionsClient.cs @@ -11,24 +11,24 @@ namespace Octokit.Reactive public interface IObservablePullRequestReviewCommentReactionsClient { /// - /// Creates a reaction for a specified Pull Request Review Comment. + /// Get all reactions for a specified Pull Request Review Comment. /// - /// https://developer.github.com/v3/reactions/#create-reaction-for-a-pull-request-review-comment + /// https://developer.github.com/v3/reactions/#list-reactions-for-a-pull-request-review-comment /// The owner of the repository /// The name of the repository - /// The comment id - /// The reaction to create + /// The comment id /// - IObservable Create(string owner, string name, int number, NewReaction reaction); + IObservable GetAll(string owner, string name, int number); /// - /// Get all reactions for a specified Pull Request Review Comment. + /// Creates a reaction for a specified Pull Request Review Comment. /// - /// https://developer.github.com/v3/reactions/#list-reactions-for-a-pull-request-review-comment + /// https://developer.github.com/v3/reactions/#create-reaction-for-a-pull-request-review-comment /// The owner of the repository /// The name of the repository - /// The comment id + /// The comment id + /// The reaction to create /// - IObservable GetAll(string owner, string name, int number); + IObservable Create(string owner, string name, int number, NewReaction reaction); } } diff --git a/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentReactionsClient.cs b/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentReactionsClient.cs index 29bd3d826d..ee528141b3 100644 --- a/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentReactionsClient.cs +++ b/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentReactionsClient.cs @@ -24,37 +24,37 @@ public ObservablePullRequestReviewCommentReactionsClient(IGitHubClient client) } /// - /// Creates a reaction for a specified Pull Request Review Comment. + /// Get all reactions for a specified Pull Request Review Comment. /// - /// https://developer.github.com/v3/reactions/#create-reaction-for-a-pull-request-review-comment + /// https://developer.github.com/v3/reactions/#list-reactions-for-a-pull-request-review-comment /// The owner of the repository /// The name of the repository - /// The comment id - /// The reaction to create + /// The comment id /// - public IObservable Create(string owner, string name, int number, NewReaction reaction) + public IObservable GetAll(string owner, string name, int number) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(name, "name"); - Ensure.ArgumentNotNull(reaction, "reaction"); - return _client.Create(owner, name, number, reaction).ToObservable(); + return _connection.GetAndFlattenAllPages(ApiUrls.PullRequestReviewCommentReaction(owner, name, number), null, AcceptHeaders.ReactionsPreview); } /// - /// Get all reactions for a specified Pull Request Review Comment. + /// Creates a reaction for a specified Pull Request Review Comment. /// - /// https://developer.github.com/v3/reactions/#list-reactions-for-a-pull-request-review-comment + /// https://developer.github.com/v3/reactions/#create-reaction-for-a-pull-request-review-comment /// The owner of the repository /// The name of the repository - /// The comment id + /// The comment id + /// The reaction to create /// - public IObservable GetAll(string owner, string name, int number) + public IObservable Create(string owner, string name, int number, NewReaction reaction) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(name, "name"); + Ensure.ArgumentNotNull(reaction, "reaction"); - return _connection.GetAndFlattenAllPages(ApiUrls.PullRequestReviewCommentReaction(owner, name, number), null, AcceptHeaders.ReactionsPreview); + return _client.Create(owner, name, number, reaction).ToObservable(); } } } diff --git a/Octokit/Clients/PullRequestReviewCommentReactionsClient.cs b/Octokit/Clients/PullRequestReviewCommentReactionsClient.cs index 6cc9208808..9da47f71f1 100644 --- a/Octokit/Clients/PullRequestReviewCommentReactionsClient.cs +++ b/Octokit/Clients/PullRequestReviewCommentReactionsClient.cs @@ -17,37 +17,37 @@ public PullRequestReviewCommentReactionsClient(IApiConnection apiConnection) } /// - /// Creates a reaction for a specified Pull Request Review Comment. + /// Get all reactions for a specified Pull Request Review Comment. /// - /// https://developer.github.com/v3/reactions/#create-reaction-for-a-pull-request-review-comment + /// https://developer.github.com/v3/reactions/#list-reactions-for-a-pull-request-review-comment /// The owner of the repository /// The name of the repository - /// The comment id - /// The reaction to create + /// The comment id /// - public Task Create(string owner, string name, int number, NewReaction reaction) + public Task> GetAll(string owner, string name, int number) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(name, "name"); - Ensure.ArgumentNotNull(reaction, "reaction"); - return ApiConnection.Post(ApiUrls.PullRequestReviewCommentReaction(owner, name, number), reaction, AcceptHeaders.ReactionsPreview); + return ApiConnection.GetAll(ApiUrls.PullRequestReviewCommentReaction(owner, name, number), AcceptHeaders.ReactionsPreview); } /// - /// Get all reactions for a specified Pull Request Review Comment. + /// Creates a reaction for a specified Pull Request Review Comment. /// - /// https://developer.github.com/v3/reactions/#list-reactions-for-a-pull-request-review-comment + /// https://developer.github.com/v3/reactions/#create-reaction-for-a-pull-request-review-comment /// The owner of the repository /// The name of the repository - /// The comment id + /// The comment id + /// The reaction to create /// - public Task> GetAll(string owner, string name, int number) + public Task Create(string owner, string name, int number, NewReaction reaction) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(name, "name"); + Ensure.ArgumentNotNull(reaction, "reaction"); - return ApiConnection.GetAll(ApiUrls.PullRequestReviewCommentReaction(owner, name, number), AcceptHeaders.ReactionsPreview); + return ApiConnection.Post(ApiUrls.PullRequestReviewCommentReaction(owner, name, number), reaction, AcceptHeaders.ReactionsPreview); } } } From 6e7e30e3fddc5e5cec02097156b6c705ef3bcf21 Mon Sep 17 00:00:00 2001 From: "aedampir@gmail.com" Date: Wed, 15 Jun 2016 18:30:06 +0700 Subject: [PATCH 3/9] modified XML docs --- .../IObservablePullRequestReviewCommentReactionsClient.cs | 4 ++-- .../ObservablePullRequestReviewCommentReactionsClient.cs | 4 ++-- Octokit/Clients/IPullRequestReviewCommentReactionsClient.cs | 4 ++-- Octokit/Clients/PullRequestReviewCommentReactionsClient.cs | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentReactionsClient.cs b/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentReactionsClient.cs index a23352ecc2..bc9e9fb06f 100644 --- a/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentReactionsClient.cs +++ b/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentReactionsClient.cs @@ -17,7 +17,7 @@ public interface IObservablePullRequestReviewCommentReactionsClient /// The owner of the repository /// The name of the repository /// The comment id - /// + /// An representing s for a specified pull request review comment. IObservable GetAll(string owner, string name, int number); /// @@ -28,7 +28,7 @@ public interface IObservablePullRequestReviewCommentReactionsClient /// The name of the repository /// The comment id /// The reaction to create - /// + /// An representing created for a specified pull request review comment. IObservable Create(string owner, string name, int number, NewReaction reaction); } } diff --git a/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentReactionsClient.cs b/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentReactionsClient.cs index ee528141b3..334e22d8a4 100644 --- a/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentReactionsClient.cs +++ b/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentReactionsClient.cs @@ -30,7 +30,7 @@ public ObservablePullRequestReviewCommentReactionsClient(IGitHubClient client) /// The owner of the repository /// The name of the repository /// The comment id - /// + /// An representing s for a specified pull request review comment. public IObservable GetAll(string owner, string name, int number) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); @@ -47,7 +47,7 @@ public IObservable GetAll(string owner, string name, int number) /// The name of the repository /// The comment id /// The reaction to create - /// + /// An representing created for a specified pull request review comment. public IObservable Create(string owner, string name, int number, NewReaction reaction) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); diff --git a/Octokit/Clients/IPullRequestReviewCommentReactionsClient.cs b/Octokit/Clients/IPullRequestReviewCommentReactionsClient.cs index dc1f65404e..4d0c3fac1d 100644 --- a/Octokit/Clients/IPullRequestReviewCommentReactionsClient.cs +++ b/Octokit/Clients/IPullRequestReviewCommentReactionsClient.cs @@ -18,7 +18,7 @@ public interface IPullRequestReviewCommentReactionsClient /// The owner of the repository /// The name of the repository /// The comment id - /// + /// A of representing s for a specified pull request review comment. Task> GetAll(string owner, string name, int number); /// @@ -29,7 +29,7 @@ public interface IPullRequestReviewCommentReactionsClient /// The name of the repository /// The comment id /// The reaction to create - /// + /// A representing created for a specified pull request review comment. Task Create(string owner, string name, int number, NewReaction reaction); } } diff --git a/Octokit/Clients/PullRequestReviewCommentReactionsClient.cs b/Octokit/Clients/PullRequestReviewCommentReactionsClient.cs index 9da47f71f1..21d63f8cf7 100644 --- a/Octokit/Clients/PullRequestReviewCommentReactionsClient.cs +++ b/Octokit/Clients/PullRequestReviewCommentReactionsClient.cs @@ -23,7 +23,7 @@ public PullRequestReviewCommentReactionsClient(IApiConnection apiConnection) /// The owner of the repository /// The name of the repository /// The comment id - /// + /// A of representing s for a specified pull request review comment. public Task> GetAll(string owner, string name, int number) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); @@ -40,7 +40,7 @@ public Task> GetAll(string owner, string name, int numbe /// The name of the repository /// The comment id /// The reaction to create - /// + /// A representing created for a specified pull request review comment. public Task Create(string owner, string name, int number, NewReaction reaction) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); From 5c1401c1ed59615f0514ba88ddab9b8ac7bf600a Mon Sep 17 00:00:00 2001 From: "aedampir@gmail.com" Date: Wed, 15 Jun 2016 18:39:18 +0700 Subject: [PATCH 4/9] added new api url --- Octokit/Helpers/ApiUrls.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Octokit/Helpers/ApiUrls.cs b/Octokit/Helpers/ApiUrls.cs index ca28659dff..72229b336f 100644 --- a/Octokit/Helpers/ApiUrls.cs +++ b/Octokit/Helpers/ApiUrls.cs @@ -1219,6 +1219,17 @@ public static Uri PullRequestReviewCommentReaction(string owner, string name, in return "repos/{0}/{1}/pulls/comments/{2}/reactions".FormatUri(owner, name, number); } + /// + /// Returns the for the reaction of a specified pull request review comment. + /// + /// The ID of the repository + /// The comment number + /// + public static Uri PullRequestReviewCommentReaction(int repositoryId, int number) + { + return "repositories/{0}/pulls/comments/{1}/reactions".FormatUri(repositoryId, number); + } + /// /// Returns the for the pull request review comments on a specified repository. /// From 301bb268bc7a3b4e33435b2c4c5b105c411d3d9f Mon Sep 17 00:00:00 2001 From: "aedampir@gmail.com" Date: Wed, 15 Jun 2016 18:40:56 +0700 Subject: [PATCH 5/9] added new overloads --- ...PullRequestReviewCommentReactionsClient.cs | 19 +++++++++++++ ...PullRequestReviewCommentReactionsClient.cs | 27 +++++++++++++++++++ ...PullRequestReviewCommentReactionsClient.cs | 19 +++++++++++++ ...PullRequestReviewCommentReactionsClient.cs | 27 +++++++++++++++++++ 4 files changed, 92 insertions(+) diff --git a/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentReactionsClient.cs b/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentReactionsClient.cs index bc9e9fb06f..f2db63c4a6 100644 --- a/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentReactionsClient.cs +++ b/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentReactionsClient.cs @@ -20,6 +20,15 @@ public interface IObservablePullRequestReviewCommentReactionsClient /// An representing s for a specified pull request review comment. IObservable GetAll(string owner, string name, int number); + /// + /// Get all reactions for a specified Pull Request Review Comment. + /// + /// https://developer.github.com/v3/reactions/#list-reactions-for-a-pull-request-review-comment + /// The ID of the repository + /// The comment id + /// An representing s for a specified pull request review comment. + IObservable GetAll(int repositoryId, int number); + /// /// Creates a reaction for a specified Pull Request Review Comment. /// @@ -30,5 +39,15 @@ public interface IObservablePullRequestReviewCommentReactionsClient /// The reaction to create /// An representing created for a specified pull request review comment. IObservable Create(string owner, string name, int number, NewReaction reaction); + + /// + /// Creates a reaction for a specified Pull Request Review Comment. + /// + /// https://developer.github.com/v3/reactions/#create-reaction-for-a-pull-request-review-comment + /// The owner of the repository + /// The comment id + /// The reaction to create + /// An representing created for a specified pull request review comment. + IObservable Create(int repositoryId, int number, NewReaction reaction); } } diff --git a/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentReactionsClient.cs b/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentReactionsClient.cs index 334e22d8a4..5f15cf173f 100644 --- a/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentReactionsClient.cs +++ b/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentReactionsClient.cs @@ -39,6 +39,18 @@ public IObservable GetAll(string owner, string name, int number) return _connection.GetAndFlattenAllPages(ApiUrls.PullRequestReviewCommentReaction(owner, name, number), null, AcceptHeaders.ReactionsPreview); } + /// + /// Get all reactions for a specified Pull Request Review Comment. + /// + /// https://developer.github.com/v3/reactions/#list-reactions-for-a-pull-request-review-comment + /// The ID of the repository + /// The comment id + /// An representing s for a specified pull request review comment. + public IObservable GetAll(int repositoryId, int number) + { + return _connection.GetAndFlattenAllPages(ApiUrls.PullRequestReviewCommentReaction(repositoryId, number), null, AcceptHeaders.ReactionsPreview); + } + /// /// Creates a reaction for a specified Pull Request Review Comment. /// @@ -56,5 +68,20 @@ public IObservable Create(string owner, string name, int number, NewRe return _client.Create(owner, name, number, reaction).ToObservable(); } + + /// + /// Creates a reaction for a specified Pull Request Review Comment. + /// + /// https://developer.github.com/v3/reactions/#create-reaction-for-a-pull-request-review-comment + /// The owner of the repository + /// The comment id + /// The reaction to create + /// An representing created for a specified pull request review comment. + public IObservable Create(int repositoryId, int number, NewReaction reaction) + { + Ensure.ArgumentNotNull(reaction, "reaction"); + + return _client.Create(repositoryId, number, reaction).ToObservable(); + } } } diff --git a/Octokit/Clients/IPullRequestReviewCommentReactionsClient.cs b/Octokit/Clients/IPullRequestReviewCommentReactionsClient.cs index 4d0c3fac1d..215a4948a2 100644 --- a/Octokit/Clients/IPullRequestReviewCommentReactionsClient.cs +++ b/Octokit/Clients/IPullRequestReviewCommentReactionsClient.cs @@ -20,6 +20,15 @@ public interface IPullRequestReviewCommentReactionsClient /// The comment id /// A of representing s for a specified pull request review comment. Task> GetAll(string owner, string name, int number); + + /// + /// Get all reactions for a specified Pull Request Review Comment. + /// + /// https://developer.github.com/v3/reactions/#list-reactions-for-a-pull-request-review-comment + /// The ID of the repository + /// The comment id + /// A of representing s for a specified pull request review comment. + Task> GetAll(int repositoryId, int number); /// /// Creates a reaction for a specified Pull Request Review Comment. @@ -31,5 +40,15 @@ public interface IPullRequestReviewCommentReactionsClient /// The reaction to create /// A representing created for a specified pull request review comment. Task Create(string owner, string name, int number, NewReaction reaction); + + /// + /// Creates a reaction for a specified Pull Request Review Comment. + /// + /// https://developer.github.com/v3/reactions/#create-reaction-for-a-pull-request-review-comment + /// The ID of the repository + /// The comment id + /// The reaction to create + /// A representing created for a specified pull request review comment. + Task Create(int repositoryId, int number, NewReaction reaction); } } diff --git a/Octokit/Clients/PullRequestReviewCommentReactionsClient.cs b/Octokit/Clients/PullRequestReviewCommentReactionsClient.cs index 21d63f8cf7..7c613dcd30 100644 --- a/Octokit/Clients/PullRequestReviewCommentReactionsClient.cs +++ b/Octokit/Clients/PullRequestReviewCommentReactionsClient.cs @@ -32,6 +32,18 @@ public Task> GetAll(string owner, string name, int numbe return ApiConnection.GetAll(ApiUrls.PullRequestReviewCommentReaction(owner, name, number), AcceptHeaders.ReactionsPreview); } + /// + /// Get all reactions for a specified Pull Request Review Comment. + /// + /// https://developer.github.com/v3/reactions/#list-reactions-for-a-pull-request-review-comment + /// The ID of the repository + /// The comment id + /// A of representing s for a specified pull request review comment. + public Task> GetAll(int repositoryId, int number) + { + return ApiConnection.GetAll(ApiUrls.PullRequestReviewCommentReaction(repositoryId, number), AcceptHeaders.ReactionsPreview); + } + /// /// Creates a reaction for a specified Pull Request Review Comment. /// @@ -49,5 +61,20 @@ public Task Create(string owner, string name, int number, NewReaction return ApiConnection.Post(ApiUrls.PullRequestReviewCommentReaction(owner, name, number), reaction, AcceptHeaders.ReactionsPreview); } + + /// + /// Creates a reaction for a specified Pull Request Review Comment. + /// + /// https://developer.github.com/v3/reactions/#create-reaction-for-a-pull-request-review-comment + /// The ID of the repository + /// The comment id + /// The reaction to create + /// A representing created for a specified pull request review comment. + public Task Create(int repositoryId, int number, NewReaction reaction) + { + Ensure.ArgumentNotNull(reaction, "reaction"); + + return ApiConnection.Post(ApiUrls.PullRequestReviewCommentReaction(repositoryId, number), reaction, AcceptHeaders.ReactionsPreview); + } } } From e8041f0123a0334a435ec700e977587a687545c7 Mon Sep 17 00:00:00 2001 From: "aedampir@gmail.com" Date: Wed, 15 Jun 2016 18:51:01 +0700 Subject: [PATCH 6/9] added new unit tests --- ...equestReviewCommentReactionsClientTests.cs | 68 +++++++++++---- ...equestReviewCommentReactionsClientTests.cs | 82 +++++++++++++------ 2 files changed, 112 insertions(+), 38 deletions(-) diff --git a/Octokit.Tests/Clients/PullRequestReviewCommentReactionsClientTests.cs b/Octokit.Tests/Clients/PullRequestReviewCommentReactionsClientTests.cs index 66bec075b6..054ef7dd85 100644 --- a/Octokit.Tests/Clients/PullRequestReviewCommentReactionsClientTests.cs +++ b/Octokit.Tests/Clients/PullRequestReviewCommentReactionsClientTests.cs @@ -1,6 +1,6 @@ -using NSubstitute; -using System; +using System; using System.Threading.Tasks; +using NSubstitute; using Xunit; namespace Octokit.Tests.Clients @@ -22,24 +22,35 @@ public class TheGetAllMethod public async Task RequestsCorrectUrl() { var connection = Substitute.For(); - var client = new ReactionsClient(connection); + var client = new PullRequestReviewCommentReactionsClient(connection); - client.PullRequestReviewComment.GetAll("fake", "repo", 42); + await client.GetAll("fake", "repo", 42); connection.Received().GetAll(Arg.Is(u => u.ToString() == "repos/fake/repo/pulls/comments/42/reactions"), "application/vnd.github.squirrel-girl-preview"); } [Fact] - public async Task EnsuresArgumentsNotNull() + public async Task RequestsCorrectUrlWithRepositoryId() { var connection = Substitute.For(); - var client = new ReactionsClient(connection); + var client = new PullRequestReviewCommentReactionsClient(connection); - await Assert.ThrowsAsync(() => client.PullRequestReviewComment.Create(null, "name", 1, new NewReaction(ReactionType.Heart))); - await Assert.ThrowsAsync(() => client.PullRequestReviewComment.Create("", "name", 1, new NewReaction(ReactionType.Heart))); - await Assert.ThrowsAsync(() => client.PullRequestReviewComment.Create("owner", null, 1, new NewReaction(ReactionType.Heart))); - await Assert.ThrowsAsync(() => client.PullRequestReviewComment.Create("owner", "", 1, new NewReaction(ReactionType.Heart))); - await Assert.ThrowsAsync(() => client.PullRequestReviewComment.Create("owner", "name", 1, null)); + await client.GetAll(1, 42); + + connection.Received().GetAll(Arg.Is(u => u.ToString() == "repositories/1/pulls/comments/42/reactions"), "application/vnd.github.squirrel-girl-preview"); + } + + [Fact] + public async Task EnsuresNonNullArguments() + { + var connection = Substitute.For(); + var client = new PullRequestReviewCommentReactionsClient(connection); + + await Assert.ThrowsAsync(() => client.GetAll(null, "name", 1)); + await Assert.ThrowsAsync(() => client.GetAll("owner", null, 1)); + + await Assert.ThrowsAsync(() => client.GetAll("", "name", 1)); + await Assert.ThrowsAsync(() => client.GetAll("owner", "", 1)); } } @@ -51,11 +62,40 @@ public void RequestsCorrectUrl() NewReaction newReaction = new NewReaction(ReactionType.Heart); var connection = Substitute.For(); - var client = new ReactionsClient(connection); + var client = new PullRequestReviewCommentReactionsClient(connection); + + client.Create("fake", "repo", 1, newReaction); + + connection.Received().Post(Arg.Is(u => u.ToString() == "repos/fake/repo/pulls/comments/1/reactions"), newReaction, "application/vnd.github.squirrel-girl-preview"); + } + + [Fact] + public void RequestsCorrectUrlWithRepositoryId() + { + NewReaction newReaction = new NewReaction(ReactionType.Heart); + + var connection = Substitute.For(); + var client = new PullRequestReviewCommentReactionsClient(connection); + + client.Create(1, 1, newReaction); + + connection.Received().Post(Arg.Is(u => u.ToString() == "repositories/1/pulls/comments/1/reactions"), newReaction, "application/vnd.github.squirrel-girl-preview"); + } + + [Fact] + public async Task EnsuresNonNullArguments() + { + var connection = Substitute.For(); + var client = new PullRequestReviewCommentReactionsClient(connection); + + await Assert.ThrowsAsync(() => client.Create(null, "name", 1, new NewReaction(ReactionType.Heart))); + await Assert.ThrowsAsync(() => client.Create("owner", null, 1, new NewReaction(ReactionType.Heart))); + await Assert.ThrowsAsync(() => client.Create("owner", "name", 1, null)); - client.PullRequestReviewComment.Create("fake", "repo", 1, newReaction); + await Assert.ThrowsAsync(() => client.Create(1, 1, null)); - connection.Received().Post(Arg.Is(u => u.ToString() == "repos/fake/repo/pulls/comments/1/reactions"), Arg.Any(), "application/vnd.github.squirrel-girl-preview"); + await Assert.ThrowsAsync(() => client.Create("", "name", 1, new NewReaction(ReactionType.Heart))); + await Assert.ThrowsAsync(() => client.Create("owner", "", 1, new NewReaction(ReactionType.Heart))); } } } diff --git a/Octokit.Tests/Reactive/ObservablePullRequestReviewCommentReactionsClientTests.cs b/Octokit.Tests/Reactive/ObservablePullRequestReviewCommentReactionsClientTests.cs index f0037c4a60..b26ce47c9c 100644 --- a/Octokit.Tests/Reactive/ObservablePullRequestReviewCommentReactionsClientTests.cs +++ b/Octokit.Tests/Reactive/ObservablePullRequestReviewCommentReactionsClientTests.cs @@ -1,13 +1,12 @@ -using NSubstitute; +using System; +using NSubstitute; using Octokit.Reactive; -using System; using Xunit; namespace Octokit.Tests.Reactive { public class ObservablePullRequestReviewCommentReactionsClientTests { - public class TheCtor { [Fact] @@ -19,33 +18,39 @@ public void EnsuresNonNullArguments() public class TheGetAllMethod { - private readonly IGitHubClient _githubClient; - private readonly IObservableReactionsClient _client; - private const string owner = "owner"; - private const string name = "name"; - - public TheGetAllMethod() + [Fact] + public void RequestsCorrectUrl() { - _githubClient = Substitute.For(); - _client = new ObservableReactionsClient(_githubClient); + var gitHubClient = Substitute.For(); + var client = new ObservablePullRequestReviewCommentReactionsClient(gitHubClient); + + client.GetAll("fake", "repo", 42); + + gitHubClient.Received().Reaction.PullRequestReviewComment.GetAll("fake", "repo", 42); } [Fact] - public void RequestsCorrectUrl() + public void RequestsCorrectUrlWithRepositoryId() { - _client.PullRequestReviewComment.GetAll("fake", "repo", 42); - _githubClient.Received().Reaction.PullRequestReviewComment.GetAll("fake", "repo", 42); + var gitHubClient = Substitute.For(); + var client = new ObservablePullRequestReviewCommentReactionsClient(gitHubClient); + + client.GetAll(1, 42); + + gitHubClient.Received().Reaction.PullRequestReviewComment.GetAll(1, 42); } [Fact] - public void EnsuresArgumentsNotNull() + public void EnsuresNonNullArguments() { + var gitHubClient = Substitute.For(); + var client = new ObservablePullRequestReviewCommentReactionsClient(gitHubClient); + + Assert.Throws(() => client.GetAll(null, "name", 1)); + Assert.Throws(() => client.GetAll("owner", null, 1)); - Assert.Throws(() => _client.PullRequestReviewComment.Create(null, "name", 1, new NewReaction(ReactionType.Heart))); - Assert.Throws(() => _client.PullRequestReviewComment.Create("", "name", 1, new NewReaction(ReactionType.Heart))); - Assert.Throws(() => _client.PullRequestReviewComment.Create("owner", null, 1, new NewReaction(ReactionType.Heart))); - Assert.Throws(() => _client.PullRequestReviewComment.Create("owner", "", 1, new NewReaction(ReactionType.Heart))); - Assert.Throws(() => _client.PullRequestReviewComment.Create("owner", "name", 1, null)); + Assert.Throws(() => client.GetAll("", "name", 1)); + Assert.Throws(() => client.GetAll("owner", "", 1)); } } @@ -54,12 +59,41 @@ public class TheCreateMethod [Fact] public void RequestsCorrectUrl() { - var githubClient = Substitute.For(); - var client = new ObservableReactionsClient(githubClient); + var gitHubClient = Substitute.For(); + var client = new ObservablePullRequestReviewCommentReactionsClient(gitHubClient); var newReaction = new NewReaction(ReactionType.Confused); - client.PullRequestReviewComment.Create("fake", "repo", 1, newReaction); - githubClient.Received().Reaction.PullRequestReviewComment.Create("fake", "repo", 1, newReaction); + client.Create("fake", "repo", 1, newReaction); + + gitHubClient.Received().Reaction.PullRequestReviewComment.Create("fake", "repo", 1, newReaction); + } + + [Fact] + public void RequestsCorrectUrlWithRepositoryId() + { + var gitHubClient = Substitute.For(); + var client = new ObservablePullRequestReviewCommentReactionsClient(gitHubClient); + var newReaction = new NewReaction(ReactionType.Confused); + + client.Create(1, 1, newReaction); + + gitHubClient.Received().Reaction.PullRequestReviewComment.Create(1, 1, newReaction); + } + + [Fact] + public void EnsuresNonNullArguments() + { + var gitHubClient = Substitute.For(); + var client = new ObservablePullRequestReviewCommentReactionsClient(gitHubClient); + + Assert.Throws(() => client.Create(null, "name", 1, new NewReaction(ReactionType.Heart))); + Assert.Throws(() => client.Create("owner", null, 1, new NewReaction(ReactionType.Heart))); + Assert.Throws(() => client.Create("owner", "name", 1, null)); + + Assert.Throws(() => client.Create(1, 1, null)); + + Assert.Throws(() => client.Create("", "name", 1, new NewReaction(ReactionType.Heart))); + Assert.Throws(() => client.Create("owner", "", 1, new NewReaction(ReactionType.Heart))); } } } From 0aaf850f07b67fe35586fd9d63ec55e3f233b6c3 Mon Sep 17 00:00:00 2001 From: "aedampir@gmail.com" Date: Wed, 15 Jun 2016 18:55:15 +0700 Subject: [PATCH 7/9] added new integration tests --- ...equestReviewCommentReactionsClientTests.cs | 78 ++++++++++++++++++- 1 file changed, 74 insertions(+), 4 deletions(-) diff --git a/Octokit.Tests.Integration/Clients/PullRequestReviewCommentReactionsClientTests.cs b/Octokit.Tests.Integration/Clients/PullRequestReviewCommentReactionsClientTests.cs index b705bfa847..9be269838f 100644 --- a/Octokit.Tests.Integration/Clients/PullRequestReviewCommentReactionsClientTests.cs +++ b/Octokit.Tests.Integration/Clients/PullRequestReviewCommentReactionsClientTests.cs @@ -1,8 +1,8 @@ -using Octokit; +using System; +using System.Threading.Tasks; +using Octokit; using Octokit.Tests.Integration; using Octokit.Tests.Integration.Helpers; -using System; -using System.Threading.Tasks; using Xunit; public class PullRequestReviewCommentReactionsClientTests : IDisposable @@ -26,6 +26,52 @@ public PullRequestReviewCommentReactionsClientTests() _context = _github.CreateRepositoryContext("test-repo").Result; } + [IntegrationTest] + public async Task CanListReactions() + { + var pullRequest = await CreatePullRequest(_context); + + const string body = "A review comment message"; + const int position = 1; + + var createdComment = await CreateComment(body, position, pullRequest.Sha, pullRequest.Number); + + var commentFromGitHub = await _client.GetComment(Helper.UserName, _context.RepositoryName, createdComment.Id); + + AssertComment(commentFromGitHub, body, position); + + var reaction = await _github.Reaction.PullRequestReviewComment.Create(_context.RepositoryOwner, _context.RepositoryName, commentFromGitHub.Id, new NewReaction(ReactionType.Heart)); + + var reactions = await _github.Reaction.PullRequestReviewComment.GetAll(_context.RepositoryOwner, _context.RepositoryName, commentFromGitHub.Id); + + Assert.NotEmpty(reactions); + Assert.Equal(reaction.Id, reactions[0].Id); + Assert.Equal(reaction.Content, reactions[0].Content); + } + + [IntegrationTest] + public async Task CanListReactionsWithRepositoryId() + { + var pullRequest = await CreatePullRequest(_context); + + const string body = "A review comment message"; + const int position = 1; + + var createdComment = await CreateComment(body, position, pullRequest.Sha, pullRequest.Number); + + var commentFromGitHub = await _client.GetComment(Helper.UserName, _context.RepositoryName, createdComment.Id); + + AssertComment(commentFromGitHub, body, position); + + var reaction = await _github.Reaction.PullRequestReviewComment.Create(_context.Repository.Id, commentFromGitHub.Id, new NewReaction(ReactionType.Heart)); + + var reactions = await _github.Reaction.PullRequestReviewComment.GetAll(_context.Repository.Id, commentFromGitHub.Id); + + Assert.NotEmpty(reactions); + Assert.Equal(reaction.Id, reactions[0].Id); + Assert.Equal(reaction.Content, reactions[0].Content); + } + [IntegrationTest] public async Task CanCreateReaction() { @@ -51,6 +97,31 @@ public async Task CanCreateReaction() Assert.Equal(commentFromGitHub.User.Id, pullRequestReviewCommentReaction.User.Id); } + [IntegrationTest] + public async Task CanCreateReactionWithRepositoryId() + { + var pullRequest = await CreatePullRequest(_context); + + const string body = "A review comment message"; + const int position = 1; + + var createdComment = await CreateComment(body, position, pullRequest.Sha, pullRequest.Number); + + var commentFromGitHub = await _client.GetComment(Helper.UserName, _context.RepositoryName, createdComment.Id); + + AssertComment(commentFromGitHub, body, position); + + var pullRequestReviewCommentReaction = await _github.Reaction.PullRequestReviewComment.Create(_context.Repository.Id, commentFromGitHub.Id, new NewReaction(ReactionType.Heart)); + + Assert.NotNull(pullRequestReviewCommentReaction); + + Assert.IsType(pullRequestReviewCommentReaction); + + Assert.Equal(ReactionType.Heart, pullRequestReviewCommentReaction.Content); + + Assert.Equal(commentFromGitHub.User.Id, pullRequestReviewCommentReaction.User.Id); + } + /// /// Creates the base state for testing (creates a repo, a commit in master, a branch, a commit in the branch and a pull request) /// @@ -154,4 +225,3 @@ class PullRequestData public string Sha { get; set; } } } - From fcab9e073caab3c0264acdc2547468ff2f593498 Mon Sep 17 00:00:00 2001 From: Alexander Efremov Date: Fri, 17 Jun 2016 06:10:53 +0700 Subject: [PATCH 8/9] cleared tags --- .../IObservablePullRequestReviewCommentReactionsClient.cs | 8 ++++---- .../ObservablePullRequestReviewCommentReactionsClient.cs | 8 ++++---- .../Clients/IPullRequestReviewCommentReactionsClient.cs | 8 ++++---- .../Clients/PullRequestReviewCommentReactionsClient.cs | 8 ++++---- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentReactionsClient.cs b/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentReactionsClient.cs index f2db63c4a6..e9c58ab2ec 100644 --- a/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentReactionsClient.cs +++ b/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentReactionsClient.cs @@ -17,7 +17,7 @@ public interface IObservablePullRequestReviewCommentReactionsClient /// The owner of the repository /// The name of the repository /// The comment id - /// An representing s for a specified pull request review comment. + /// IObservable GetAll(string owner, string name, int number); /// @@ -26,7 +26,7 @@ public interface IObservablePullRequestReviewCommentReactionsClient /// https://developer.github.com/v3/reactions/#list-reactions-for-a-pull-request-review-comment /// The ID of the repository /// The comment id - /// An representing s for a specified pull request review comment. + /// IObservable GetAll(int repositoryId, int number); /// @@ -37,7 +37,7 @@ public interface IObservablePullRequestReviewCommentReactionsClient /// The name of the repository /// The comment id /// The reaction to create - /// An representing created for a specified pull request review comment. + /// IObservable Create(string owner, string name, int number, NewReaction reaction); /// @@ -47,7 +47,7 @@ public interface IObservablePullRequestReviewCommentReactionsClient /// The owner of the repository /// The comment id /// The reaction to create - /// An representing created for a specified pull request review comment. + /// IObservable Create(int repositoryId, int number, NewReaction reaction); } } diff --git a/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentReactionsClient.cs b/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentReactionsClient.cs index 5f15cf173f..5dc1915b4b 100644 --- a/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentReactionsClient.cs +++ b/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentReactionsClient.cs @@ -30,7 +30,7 @@ public ObservablePullRequestReviewCommentReactionsClient(IGitHubClient client) /// The owner of the repository /// The name of the repository /// The comment id - /// An representing s for a specified pull request review comment. + /// public IObservable GetAll(string owner, string name, int number) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); @@ -45,7 +45,7 @@ public IObservable GetAll(string owner, string name, int number) /// https://developer.github.com/v3/reactions/#list-reactions-for-a-pull-request-review-comment /// The ID of the repository /// The comment id - /// An representing s for a specified pull request review comment. + /// public IObservable GetAll(int repositoryId, int number) { return _connection.GetAndFlattenAllPages(ApiUrls.PullRequestReviewCommentReaction(repositoryId, number), null, AcceptHeaders.ReactionsPreview); @@ -59,7 +59,7 @@ public IObservable GetAll(int repositoryId, int number) /// The name of the repository /// The comment id /// The reaction to create - /// An representing created for a specified pull request review comment. + /// public IObservable Create(string owner, string name, int number, NewReaction reaction) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); @@ -76,7 +76,7 @@ public IObservable Create(string owner, string name, int number, NewRe /// The owner of the repository /// The comment id /// The reaction to create - /// An representing created for a specified pull request review comment. + /// public IObservable Create(int repositoryId, int number, NewReaction reaction) { Ensure.ArgumentNotNull(reaction, "reaction"); diff --git a/Octokit/Clients/IPullRequestReviewCommentReactionsClient.cs b/Octokit/Clients/IPullRequestReviewCommentReactionsClient.cs index 215a4948a2..236dfb7513 100644 --- a/Octokit/Clients/IPullRequestReviewCommentReactionsClient.cs +++ b/Octokit/Clients/IPullRequestReviewCommentReactionsClient.cs @@ -18,7 +18,7 @@ public interface IPullRequestReviewCommentReactionsClient /// The owner of the repository /// The name of the repository /// The comment id - /// A of representing s for a specified pull request review comment. + /// Task> GetAll(string owner, string name, int number); /// @@ -27,7 +27,7 @@ public interface IPullRequestReviewCommentReactionsClient /// https://developer.github.com/v3/reactions/#list-reactions-for-a-pull-request-review-comment /// The ID of the repository /// The comment id - /// A of representing s for a specified pull request review comment. + /// Task> GetAll(int repositoryId, int number); /// @@ -38,7 +38,7 @@ public interface IPullRequestReviewCommentReactionsClient /// The name of the repository /// The comment id /// The reaction to create - /// A representing created for a specified pull request review comment. + /// Task Create(string owner, string name, int number, NewReaction reaction); /// @@ -48,7 +48,7 @@ public interface IPullRequestReviewCommentReactionsClient /// The ID of the repository /// The comment id /// The reaction to create - /// A representing created for a specified pull request review comment. + /// Task Create(int repositoryId, int number, NewReaction reaction); } } diff --git a/Octokit/Clients/PullRequestReviewCommentReactionsClient.cs b/Octokit/Clients/PullRequestReviewCommentReactionsClient.cs index 7c613dcd30..02cac77dd5 100644 --- a/Octokit/Clients/PullRequestReviewCommentReactionsClient.cs +++ b/Octokit/Clients/PullRequestReviewCommentReactionsClient.cs @@ -23,7 +23,7 @@ public PullRequestReviewCommentReactionsClient(IApiConnection apiConnection) /// The owner of the repository /// The name of the repository /// The comment id - /// A of representing s for a specified pull request review comment. + /// public Task> GetAll(string owner, string name, int number) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); @@ -38,7 +38,7 @@ public Task> GetAll(string owner, string name, int numbe /// https://developer.github.com/v3/reactions/#list-reactions-for-a-pull-request-review-comment /// The ID of the repository /// The comment id - /// A of representing s for a specified pull request review comment. + /// public Task> GetAll(int repositoryId, int number) { return ApiConnection.GetAll(ApiUrls.PullRequestReviewCommentReaction(repositoryId, number), AcceptHeaders.ReactionsPreview); @@ -52,7 +52,7 @@ public Task> GetAll(int repositoryId, int number) /// The name of the repository /// The comment id /// The reaction to create - /// A representing created for a specified pull request review comment. + /// public Task Create(string owner, string name, int number, NewReaction reaction) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); @@ -69,7 +69,7 @@ public Task Create(string owner, string name, int number, NewReaction /// The ID of the repository /// The comment id /// The reaction to create - /// A representing created for a specified pull request review comment. + /// public Task Create(int repositoryId, int number, NewReaction reaction) { Ensure.ArgumentNotNull(reaction, "reaction"); From 0c1a4e0d0058535292b0329f506556e66470188a Mon Sep 17 00:00:00 2001 From: "aedampir@gmail.com" Date: Wed, 6 Jul 2016 02:35:20 +0700 Subject: [PATCH 9/9] burned tags --- .../IObservablePullRequestReviewCommentReactionsClient.cs | 4 ---- .../ObservablePullRequestReviewCommentReactionsClient.cs | 4 ---- Octokit/Clients/IPullRequestReviewCommentReactionsClient.cs | 4 ---- Octokit/Clients/PullRequestReviewCommentReactionsClient.cs | 4 ---- 4 files changed, 16 deletions(-) diff --git a/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentReactionsClient.cs b/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentReactionsClient.cs index e9c58ab2ec..8fee248e19 100644 --- a/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentReactionsClient.cs +++ b/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentReactionsClient.cs @@ -17,7 +17,6 @@ public interface IObservablePullRequestReviewCommentReactionsClient /// The owner of the repository /// The name of the repository /// The comment id - /// IObservable GetAll(string owner, string name, int number); /// @@ -26,7 +25,6 @@ public interface IObservablePullRequestReviewCommentReactionsClient /// https://developer.github.com/v3/reactions/#list-reactions-for-a-pull-request-review-comment /// The ID of the repository /// The comment id - /// IObservable GetAll(int repositoryId, int number); /// @@ -37,7 +35,6 @@ public interface IObservablePullRequestReviewCommentReactionsClient /// The name of the repository /// The comment id /// The reaction to create - /// IObservable Create(string owner, string name, int number, NewReaction reaction); /// @@ -47,7 +44,6 @@ public interface IObservablePullRequestReviewCommentReactionsClient /// The owner of the repository /// The comment id /// The reaction to create - /// IObservable Create(int repositoryId, int number, NewReaction reaction); } } diff --git a/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentReactionsClient.cs b/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentReactionsClient.cs index 5dc1915b4b..abf8132bf6 100644 --- a/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentReactionsClient.cs +++ b/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentReactionsClient.cs @@ -30,7 +30,6 @@ public ObservablePullRequestReviewCommentReactionsClient(IGitHubClient client) /// The owner of the repository /// The name of the repository /// The comment id - /// public IObservable GetAll(string owner, string name, int number) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); @@ -45,7 +44,6 @@ public IObservable GetAll(string owner, string name, int number) /// https://developer.github.com/v3/reactions/#list-reactions-for-a-pull-request-review-comment /// The ID of the repository /// The comment id - /// public IObservable GetAll(int repositoryId, int number) { return _connection.GetAndFlattenAllPages(ApiUrls.PullRequestReviewCommentReaction(repositoryId, number), null, AcceptHeaders.ReactionsPreview); @@ -59,7 +57,6 @@ public IObservable GetAll(int repositoryId, int number) /// The name of the repository /// The comment id /// The reaction to create - /// public IObservable Create(string owner, string name, int number, NewReaction reaction) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); @@ -76,7 +73,6 @@ public IObservable Create(string owner, string name, int number, NewRe /// The owner of the repository /// The comment id /// The reaction to create - /// public IObservable Create(int repositoryId, int number, NewReaction reaction) { Ensure.ArgumentNotNull(reaction, "reaction"); diff --git a/Octokit/Clients/IPullRequestReviewCommentReactionsClient.cs b/Octokit/Clients/IPullRequestReviewCommentReactionsClient.cs index 236dfb7513..e0c2480a7f 100644 --- a/Octokit/Clients/IPullRequestReviewCommentReactionsClient.cs +++ b/Octokit/Clients/IPullRequestReviewCommentReactionsClient.cs @@ -18,7 +18,6 @@ public interface IPullRequestReviewCommentReactionsClient /// The owner of the repository /// The name of the repository /// The comment id - /// Task> GetAll(string owner, string name, int number); /// @@ -27,7 +26,6 @@ public interface IPullRequestReviewCommentReactionsClient /// https://developer.github.com/v3/reactions/#list-reactions-for-a-pull-request-review-comment /// The ID of the repository /// The comment id - /// Task> GetAll(int repositoryId, int number); /// @@ -38,7 +36,6 @@ public interface IPullRequestReviewCommentReactionsClient /// The name of the repository /// The comment id /// The reaction to create - /// Task Create(string owner, string name, int number, NewReaction reaction); /// @@ -48,7 +45,6 @@ public interface IPullRequestReviewCommentReactionsClient /// The ID of the repository /// The comment id /// The reaction to create - /// Task Create(int repositoryId, int number, NewReaction reaction); } } diff --git a/Octokit/Clients/PullRequestReviewCommentReactionsClient.cs b/Octokit/Clients/PullRequestReviewCommentReactionsClient.cs index 02cac77dd5..902a7ea983 100644 --- a/Octokit/Clients/PullRequestReviewCommentReactionsClient.cs +++ b/Octokit/Clients/PullRequestReviewCommentReactionsClient.cs @@ -23,7 +23,6 @@ public PullRequestReviewCommentReactionsClient(IApiConnection apiConnection) /// The owner of the repository /// The name of the repository /// The comment id - /// public Task> GetAll(string owner, string name, int number) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); @@ -38,7 +37,6 @@ public Task> GetAll(string owner, string name, int numbe /// https://developer.github.com/v3/reactions/#list-reactions-for-a-pull-request-review-comment /// The ID of the repository /// The comment id - /// public Task> GetAll(int repositoryId, int number) { return ApiConnection.GetAll(ApiUrls.PullRequestReviewCommentReaction(repositoryId, number), AcceptHeaders.ReactionsPreview); @@ -52,7 +50,6 @@ public Task> GetAll(int repositoryId, int number) /// The name of the repository /// The comment id /// The reaction to create - /// public Task Create(string owner, string name, int number, NewReaction reaction) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); @@ -69,7 +66,6 @@ public Task Create(string owner, string name, int number, NewReaction /// The ID of the repository /// The comment id /// The reaction to create - /// public Task Create(int repositoryId, int number, NewReaction reaction) { Ensure.ArgumentNotNull(reaction, "reaction");