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 | 26 ++++++++++++------- ...PullRequestReviewCommentReactionsClient.cs | 9 +++++-- 4 files changed, 37 insertions(+), 16 deletions(-) diff --git a/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentReactionsClient.cs b/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentReactionsClient.cs index 75cc0a88..5aace375 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 e917ef5a..29bd3d82 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 5c2c4dba..dc1f6540 100644 --- a/Octokit/Clients/IPullRequestReviewCommentReactionsClient.cs +++ b/Octokit/Clients/IPullRequestReviewCommentReactionsClient.cs @@ -3,8 +3,24 @@ using System.Threading.Tasks; namespace Octokit { + /// + /// A client for GitHub's Reactions API. + /// + /// + /// See the Reactions API documentation for more information. + /// public interface IPullRequestReviewCommentReactionsClient { + /// + /// 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 owner of the repository + /// The name of the repository + /// The comment id + /// + Task> GetAll(string owner, string name, int number); + /// /// Creates a reaction for a specified Pull Request Review Comment. /// @@ -15,15 +31,5 @@ namespace Octokit /// The reaction to create /// Task Create(string owner, string name, int number, NewReaction reaction); - - /// - /// 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 owner of the repository - /// The name of the repository - /// The comment id - /// - Task> GetAll(string owner, string name, int number); } } diff --git a/Octokit/Clients/PullRequestReviewCommentReactionsClient.cs b/Octokit/Clients/PullRequestReviewCommentReactionsClient.cs index 4c07dffa..6cc92088 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 | 20 ++++++------ ...PullRequestReviewCommentReactionsClient.cs | 32 +++++++++---------- ...PullRequestReviewCommentReactionsClient.cs | 32 +++++++++---------- 3 files changed, 42 insertions(+), 42 deletions(-) diff --git a/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentReactionsClient.cs b/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentReactionsClient.cs index 5aace375..a23352ec 100644 --- a/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentReactionsClient.cs +++ b/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentReactionsClient.cs @@ -10,6 +10,16 @@ namespace Octokit.Reactive /// public interface IObservablePullRequestReviewCommentReactionsClient { + /// + /// 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 owner of the repository + /// The name of the repository + /// The comment id + /// + IObservable GetAll(string owner, string name, int number); + /// /// Creates a reaction for a specified Pull Request Review Comment. /// @@ -20,15 +30,5 @@ namespace Octokit.Reactive /// The reaction to create /// IObservable Create(string owner, string name, int number, NewReaction reaction); - - /// - /// 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 owner of the repository - /// The name of the repository - /// The comment id - /// - IObservable GetAll(string owner, string name, int number); } } diff --git a/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentReactionsClient.cs b/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentReactionsClient.cs index 29bd3d82..ee528141 100644 --- a/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentReactionsClient.cs +++ b/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentReactionsClient.cs @@ -23,6 +23,22 @@ namespace Octokit.Reactive _connection = client.Connection; } + /// + /// 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 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"); + Ensure.ArgumentNotNullOrEmptyString(name, "name"); + + return _connection.GetAndFlattenAllPages(ApiUrls.PullRequestReviewCommentReaction(owner, name, number), null, AcceptHeaders.ReactionsPreview); + } + /// /// Creates a reaction for a specified Pull Request Review Comment. /// @@ -40,21 +56,5 @@ namespace Octokit.Reactive return _client.Create(owner, name, number, reaction).ToObservable(); } - - /// - /// 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 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"); - Ensure.ArgumentNotNullOrEmptyString(name, "name"); - - return _connection.GetAndFlattenAllPages(ApiUrls.PullRequestReviewCommentReaction(owner, name, number), null, AcceptHeaders.ReactionsPreview); - } } } diff --git a/Octokit/Clients/PullRequestReviewCommentReactionsClient.cs b/Octokit/Clients/PullRequestReviewCommentReactionsClient.cs index 6cc92088..9da47f71 100644 --- a/Octokit/Clients/PullRequestReviewCommentReactionsClient.cs +++ b/Octokit/Clients/PullRequestReviewCommentReactionsClient.cs @@ -16,6 +16,22 @@ namespace Octokit { } + /// + /// 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 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"); + Ensure.ArgumentNotNullOrEmptyString(name, "name"); + + return ApiConnection.GetAll(ApiUrls.PullRequestReviewCommentReaction(owner, name, number), AcceptHeaders.ReactionsPreview); + } + /// /// Creates a reaction for a specified Pull Request Review Comment. /// @@ -33,21 +49,5 @@ namespace Octokit return ApiConnection.Post(ApiUrls.PullRequestReviewCommentReaction(owner, name, number), reaction, 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 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"); - Ensure.ArgumentNotNullOrEmptyString(name, "name"); - - return ApiConnection.GetAll(ApiUrls.PullRequestReviewCommentReaction(owner, name, number), 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 a23352ec..bc9e9fb0 100644 --- a/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentReactionsClient.cs +++ b/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentReactionsClient.cs @@ -17,7 +17,7 @@ namespace Octokit.Reactive /// 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 @@ namespace Octokit.Reactive /// 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 ee528141..334e22d8 100644 --- a/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentReactionsClient.cs +++ b/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentReactionsClient.cs @@ -30,7 +30,7 @@ namespace Octokit.Reactive /// 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 @@ namespace Octokit.Reactive /// 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 dc1f6540..4d0c3fac 100644 --- a/Octokit/Clients/IPullRequestReviewCommentReactionsClient.cs +++ b/Octokit/Clients/IPullRequestReviewCommentReactionsClient.cs @@ -18,7 +18,7 @@ namespace Octokit /// 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 @@ namespace Octokit /// 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 9da47f71..21d63f8c 100644 --- a/Octokit/Clients/PullRequestReviewCommentReactionsClient.cs +++ b/Octokit/Clients/PullRequestReviewCommentReactionsClient.cs @@ -23,7 +23,7 @@ namespace Octokit /// 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 @@ namespace Octokit /// 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 ca28659d..72229b33 100644 --- a/Octokit/Helpers/ApiUrls.cs +++ b/Octokit/Helpers/ApiUrls.cs @@ -1219,6 +1219,17 @@ namespace Octokit 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 bc9e9fb0..f2db63c4 100644 --- a/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentReactionsClient.cs +++ b/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentReactionsClient.cs @@ -20,6 +20,15 @@ namespace Octokit.Reactive /// 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 @@ namespace Octokit.Reactive /// 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 334e22d8..5f15cf17 100644 --- a/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentReactionsClient.cs +++ b/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentReactionsClient.cs @@ -39,6 +39,18 @@ namespace Octokit.Reactive 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 @@ namespace Octokit.Reactive 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 4d0c3fac..215a4948 100644 --- a/Octokit/Clients/IPullRequestReviewCommentReactionsClient.cs +++ b/Octokit/Clients/IPullRequestReviewCommentReactionsClient.cs @@ -20,6 +20,15 @@ namespace Octokit /// 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 @@ namespace Octokit /// 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 21d63f8c..7c613dcd 100644 --- a/Octokit/Clients/PullRequestReviewCommentReactionsClient.cs +++ b/Octokit/Clients/PullRequestReviewCommentReactionsClient.cs @@ -32,6 +32,18 @@ namespace Octokit 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 @@ namespace Octokit 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 | 86 +++++++++++++------ 2 files changed, 114 insertions(+), 40 deletions(-) diff --git a/Octokit.Tests/Clients/PullRequestReviewCommentReactionsClientTests.cs b/Octokit.Tests/Clients/PullRequestReviewCommentReactionsClientTests.cs index 66bec075..054ef7dd 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 @@ namespace Octokit.Tests.Clients 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 @@ namespace Octokit.Tests.Clients NewReaction newReaction = new NewReaction(ReactionType.Heart); var connection = Substitute.For(); - var client = new ReactionsClient(connection); + var client = new PullRequestReviewCommentReactionsClient(connection); - client.PullRequestReviewComment.Create("fake", "repo", 1, newReaction); + client.Create("fake", "repo", 1, newReaction); - connection.Received().Post(Arg.Is(u => u.ToString() == "repos/fake/repo/pulls/comments/1/reactions"), Arg.Any(), "application/vnd.github.squirrel-girl-preview"); + 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)); + + await Assert.ThrowsAsync(() => client.Create(1, 1, null)); + + 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 f0037c4a..b26ce47c 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 @@ namespace Octokit.Tests.Reactive public class TheGetAllMethod { - private readonly IGitHubClient _githubClient; - private readonly IObservableReactionsClient _client; - private const string owner = "owner"; - private const string name = "name"; - - public TheGetAllMethod() - { - _githubClient = Substitute.For(); - _client = new ObservableReactionsClient(_githubClient); - } - [Fact] public void RequestsCorrectUrl() { - _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("fake", "repo", 42); + + gitHubClient.Received().Reaction.PullRequestReviewComment.GetAll("fake", "repo", 42); } [Fact] - public void EnsuresArgumentsNotNull() + public void RequestsCorrectUrlWithRepositoryId() { + var gitHubClient = Substitute.For(); + var client = new ObservablePullRequestReviewCommentReactionsClient(gitHubClient); - 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)); + client.GetAll(1, 42); + + gitHubClient.Received().Reaction.PullRequestReviewComment.GetAll(1, 42); + } + + [Fact] + 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.GetAll("", "name", 1)); + Assert.Throws(() => client.GetAll("owner", "", 1)); } } @@ -54,12 +59,41 @@ namespace Octokit.Tests.Reactive [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 b705bfa8..9be26983 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 class PullRequestReviewCommentReactionsClientTests : IDisposable _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 class PullRequestReviewCommentReactionsClientTests : IDisposable 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 @@ public class PullRequestReviewCommentReactionsClientTests : IDisposable 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 f2db63c4..e9c58ab2 100644 --- a/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentReactionsClient.cs +++ b/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentReactionsClient.cs @@ -17,7 +17,7 @@ namespace Octokit.Reactive /// 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 @@ namespace Octokit.Reactive /// 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 @@ namespace Octokit.Reactive /// 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 @@ namespace Octokit.Reactive /// 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 5f15cf17..5dc1915b 100644 --- a/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentReactionsClient.cs +++ b/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentReactionsClient.cs @@ -30,7 +30,7 @@ namespace Octokit.Reactive /// 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 @@ namespace Octokit.Reactive /// 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 @@ namespace Octokit.Reactive /// 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 @@ namespace Octokit.Reactive /// 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 215a4948..236dfb75 100644 --- a/Octokit/Clients/IPullRequestReviewCommentReactionsClient.cs +++ b/Octokit/Clients/IPullRequestReviewCommentReactionsClient.cs @@ -18,7 +18,7 @@ namespace Octokit /// 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 @@ namespace Octokit /// 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 @@ namespace Octokit /// 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 @@ namespace Octokit /// 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 7c613dcd..02cac77d 100644 --- a/Octokit/Clients/PullRequestReviewCommentReactionsClient.cs +++ b/Octokit/Clients/PullRequestReviewCommentReactionsClient.cs @@ -23,7 +23,7 @@ namespace Octokit /// 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 @@ namespace Octokit /// 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 @@ namespace Octokit /// 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 @@ namespace Octokit /// 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 e9c58ab2..8fee248e 100644 --- a/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentReactionsClient.cs +++ b/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentReactionsClient.cs @@ -17,7 +17,6 @@ namespace Octokit.Reactive /// 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 @@ namespace Octokit.Reactive /// 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 @@ namespace Octokit.Reactive /// 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 @@ namespace Octokit.Reactive /// 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 5dc1915b..abf8132b 100644 --- a/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentReactionsClient.cs +++ b/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentReactionsClient.cs @@ -30,7 +30,6 @@ namespace Octokit.Reactive /// 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 @@ namespace Octokit.Reactive /// 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 @@ namespace Octokit.Reactive /// 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 @@ namespace Octokit.Reactive /// 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 236dfb75..e0c2480a 100644 --- a/Octokit/Clients/IPullRequestReviewCommentReactionsClient.cs +++ b/Octokit/Clients/IPullRequestReviewCommentReactionsClient.cs @@ -18,7 +18,6 @@ namespace Octokit /// 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 @@ namespace Octokit /// 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 @@ namespace Octokit /// 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 @@ namespace Octokit /// 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 02cac77d..902a7ea9 100644 --- a/Octokit/Clients/PullRequestReviewCommentReactionsClient.cs +++ b/Octokit/Clients/PullRequestReviewCommentReactionsClient.cs @@ -23,7 +23,6 @@ namespace Octokit /// 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 @@ namespace Octokit /// 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 @@ namespace Octokit /// 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 @@ namespace Octokit /// 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");