From 554e2c1dc719c3cbc75351ef0ec0da2c2cf1137a Mon Sep 17 00:00:00 2001 From: "aedampir@gmail.com" Date: Wed, 15 Jun 2016 17:51:25 +0700 Subject: [PATCH 01/13] modified XML docs --- .../Clients/IObservableIssueReactionsClient.cs | 10 ++++++++-- .../Clients/ObservableIssueReactionsClient.cs | 10 ++++++++-- Octokit/Clients/IIssueReactionsClient.cs | 10 ++++++++-- Octokit/Clients/IssueReactionsClient.cs | 15 ++++++++++----- 4 files changed, 34 insertions(+), 11 deletions(-) diff --git a/Octokit.Reactive/Clients/IObservableIssueReactionsClient.cs b/Octokit.Reactive/Clients/IObservableIssueReactionsClient.cs index 3cfc109b..e87af5f9 100644 --- a/Octokit.Reactive/Clients/IObservableIssueReactionsClient.cs +++ b/Octokit.Reactive/Clients/IObservableIssueReactionsClient.cs @@ -2,6 +2,12 @@ namespace Octokit.Reactive { + /// + /// A client for GitHub's Reactions API. + /// + /// + /// See the Reactions API documentation for more information. + /// public interface IObservableIssueReactionsClient { /// @@ -12,7 +18,7 @@ namespace Octokit.Reactive /// The name of the repository /// The issue id /// The reaction to create - /// + /// An representing created for a specified issue. IObservable Create(string owner, string name, int number, NewReaction reaction); /// @@ -22,7 +28,7 @@ namespace Octokit.Reactive /// The owner of the repository /// The name of the repository /// The issue id - /// + /// An representing s for a specified issue. IObservable GetAll(string owner, string name, int number); } } diff --git a/Octokit.Reactive/Clients/ObservableIssueReactionsClient.cs b/Octokit.Reactive/Clients/ObservableIssueReactionsClient.cs index 305e2408..e74a284f 100644 --- a/Octokit.Reactive/Clients/ObservableIssueReactionsClient.cs +++ b/Octokit.Reactive/Clients/ObservableIssueReactionsClient.cs @@ -4,6 +4,12 @@ using System.Reactive.Threading.Tasks; namespace Octokit.Reactive { + /// + /// A client for GitHub's Reactions API. + /// + /// + /// See the Reactions API documentation for more information. + /// public class ObservableIssueReactionsClient : IObservableIssueReactionsClient { readonly IIssueReactionsClient _client; @@ -25,7 +31,7 @@ namespace Octokit.Reactive /// The name of the repository /// The issue id /// The reaction to create - /// + /// An representing created for a specified issue. public IObservable Create(string owner, string name, int number, NewReaction reaction) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); @@ -42,7 +48,7 @@ namespace Octokit.Reactive /// The owner of the repository /// The name of the repository /// The issue id - /// + /// An representing s for a specified issue. public IObservable GetAll(string owner, string name, int number) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); diff --git a/Octokit/Clients/IIssueReactionsClient.cs b/Octokit/Clients/IIssueReactionsClient.cs index 478e0b2b..ca5fabf5 100644 --- a/Octokit/Clients/IIssueReactionsClient.cs +++ b/Octokit/Clients/IIssueReactionsClient.cs @@ -3,6 +3,12 @@ using System.Threading.Tasks; namespace Octokit { + /// + /// A client for GitHub's Reactions API. + /// + /// + /// See the Reactions API documentation for more information. + /// public interface IIssueReactionsClient { /// @@ -12,7 +18,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// The issue id - /// + /// A of representing s for a specified issue. Task> GetAll(string owner, string name, int number); /// @@ -23,7 +29,7 @@ namespace Octokit /// The name of the repository /// The issue id /// The reaction to create - /// + /// A representing created for a specified issue. Task Create(string owner, string name, int number, NewReaction reaction); } } diff --git a/Octokit/Clients/IssueReactionsClient.cs b/Octokit/Clients/IssueReactionsClient.cs index d630bfce..914ed77f 100644 --- a/Octokit/Clients/IssueReactionsClient.cs +++ b/Octokit/Clients/IssueReactionsClient.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 IssueReactionsClient : ApiClient, IIssueReactionsClient { public IssueReactionsClient(IApiConnection apiConnection) @@ -14,12 +19,12 @@ namespace Octokit /// /// Creates a reaction for a specified Issue /// - /// https://developer.github.com/v3/reactions/#create-reactions-for-an-issue + /// https://developer.github.com/v3/reactions/#create-reaction-for-an-issue /// The owner of the repository /// The name of the repository /// The issue id /// The reaction to create - /// + /// A representing created for a specified issue. public Task Create(string owner, string name, int number, NewReaction reaction) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); @@ -36,7 +41,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// The issue id - /// + /// A of representing s for a specified issue. public Task> GetAll(string owner, string name, int number) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); From cd016505993bbefdd421cad6d701a30bff249955 Mon Sep 17 00:00:00 2001 From: "aedampir@gmail.com" Date: Wed, 15 Jun 2016 17:52:17 +0700 Subject: [PATCH 02/13] modified XML docs --- Octokit/Clients/IIssueReactionsClient.cs | 2 +- Octokit/Clients/IssueReactionsClient.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Octokit/Clients/IIssueReactionsClient.cs b/Octokit/Clients/IIssueReactionsClient.cs index ca5fabf5..5860daa0 100644 --- a/Octokit/Clients/IIssueReactionsClient.cs +++ b/Octokit/Clients/IIssueReactionsClient.cs @@ -18,7 +18,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// The issue id - /// A of representing s for a specified issue. + /// A of representing s for a specified issue. Task> GetAll(string owner, string name, int number); /// diff --git a/Octokit/Clients/IssueReactionsClient.cs b/Octokit/Clients/IssueReactionsClient.cs index 914ed77f..dc57f21b 100644 --- a/Octokit/Clients/IssueReactionsClient.cs +++ b/Octokit/Clients/IssueReactionsClient.cs @@ -41,7 +41,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// The issue id - /// A of representing s for a specified issue. + /// A of representing s for a specified issue. public Task> GetAll(string owner, string name, int number) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); From d1ede94573c6a1bcb8237c091ef30d1fc2f10c45 Mon Sep 17 00:00:00 2001 From: "aedampir@gmail.com" Date: Wed, 15 Jun 2016 17:53:16 +0700 Subject: [PATCH 03/13] code reformat --- Octokit.Reactive/Clients/ObservableIssueReactionsClient.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Octokit.Reactive/Clients/ObservableIssueReactionsClient.cs b/Octokit.Reactive/Clients/ObservableIssueReactionsClient.cs index e74a284f..f7026973 100644 --- a/Octokit.Reactive/Clients/ObservableIssueReactionsClient.cs +++ b/Octokit.Reactive/Clients/ObservableIssueReactionsClient.cs @@ -1,6 +1,6 @@ -using Octokit.Reactive.Internal; -using System; +using System; using System.Reactive.Threading.Tasks; +using Octokit.Reactive.Internal; namespace Octokit.Reactive { From edddbedf56dbc2bf94ab55ec63717c9c1f68c294 Mon Sep 17 00:00:00 2001 From: "aedampir@gmail.com" Date: Wed, 15 Jun 2016 18:00:25 +0700 Subject: [PATCH 04/13] 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..dbc43c25 100644 --- a/Octokit/Helpers/ApiUrls.cs +++ b/Octokit/Helpers/ApiUrls.cs @@ -330,6 +330,17 @@ namespace Octokit return "repos/{0}/{1}/issues/{2}/reactions".FormatUri(owner, name, number); } + /// + /// Returns the for the reaction of a specified issue. + /// + /// The ID of the repository + /// The issue number + /// + public static Uri IssueReactions(int repositoryId, int number) + { + return "repositories/{0}/issues/{1}/reactions".FormatUri(repositoryId, number); + } + /// /// Returns the for the comments for all issues in a specific repo. /// From 1e36a4e3c30d792d059025f0ee5f3a53706ffcdc Mon Sep 17 00:00:00 2001 From: "aedampir@gmail.com" Date: Wed, 15 Jun 2016 18:03:10 +0700 Subject: [PATCH 05/13] added new overloads --- .../IObservableIssueReactionsClient.cs | 33 ++++++++++--- .../Clients/ObservableIssueReactionsClient.cs | 47 ++++++++++++++----- Octokit/Clients/IIssueReactionsClient.cs | 19 ++++++++ Octokit/Clients/IssueReactionsClient.cs | 47 +++++++++++++++---- 4 files changed, 118 insertions(+), 28 deletions(-) diff --git a/Octokit.Reactive/Clients/IObservableIssueReactionsClient.cs b/Octokit.Reactive/Clients/IObservableIssueReactionsClient.cs index e87af5f9..03aa0e90 100644 --- a/Octokit.Reactive/Clients/IObservableIssueReactionsClient.cs +++ b/Octokit.Reactive/Clients/IObservableIssueReactionsClient.cs @@ -10,6 +10,25 @@ namespace Octokit.Reactive /// public interface IObservableIssueReactionsClient { + /// + /// List reactions for a specified Issue. + /// + /// https://developer.github.com/v3/reactions/#list-reactions-for-an-issue + /// The owner of the repository + /// The name of the repository + /// The issue id + /// An representing s for a specified issue. + IObservable GetAll(string owner, string name, int number); + + /// + /// List reactions for a specified Issue. + /// + /// https://developer.github.com/v3/reactions/#list-reactions-for-an-issue + /// The ID of the repository + /// The issue id + /// An representing s for a specified issue. + IObservable GetAll(int repositoryId, int number); + /// /// Creates a reaction for a specified Issue. /// @@ -22,13 +41,13 @@ namespace Octokit.Reactive IObservable Create(string owner, string name, int number, NewReaction reaction); /// - /// List reactions for a specified Issue. + /// Creates a reaction for a specified Issue. /// - /// https://developer.github.com/v3/reactions/#list-reactions-for-an-issue - /// The owner of the repository - /// The name of the repository - /// The issue id - /// An representing s for a specified issue. - IObservable GetAll(string owner, string name, int number); + /// https://developer.github.com/v3/reactions/#create-reaction-for-an-issue + /// The ID of the repository + /// The issue id + /// The reaction to create + /// An representing created for a specified issue. + IObservable Create(int repositoryId, int number, NewReaction reaction); } } diff --git a/Octokit.Reactive/Clients/ObservableIssueReactionsClient.cs b/Octokit.Reactive/Clients/ObservableIssueReactionsClient.cs index f7026973..7249abdc 100644 --- a/Octokit.Reactive/Clients/ObservableIssueReactionsClient.cs +++ b/Octokit.Reactive/Clients/ObservableIssueReactionsClient.cs @@ -23,6 +23,34 @@ namespace Octokit.Reactive _connection = client.Connection; } + /// + /// List reactions for a specified Issue + /// + /// https://developer.github.com/v3/reactions/#list-reactions-for-an-issue + /// The owner of the repository + /// The name of the repository + /// The issue id + /// An representing s for a specified issue. + public IObservable GetAll(string owner, string name, int number) + { + Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); + Ensure.ArgumentNotNullOrEmptyString(name, "name"); + + return _connection.GetAndFlattenAllPages(ApiUrls.IssueReactions(owner, name, number), null, AcceptHeaders.ReactionsPreview); + } + + /// + /// List reactions for a specified Issue. + /// + /// https://developer.github.com/v3/reactions/#list-reactions-for-an-issue + /// The ID of the repository + /// The issue id + /// An representing s for a specified issue. + public IObservable GetAll(int repositoryId, int number) + { + return _connection.GetAndFlattenAllPages(ApiUrls.IssueReactions(repositoryId, number), null, AcceptHeaders.ReactionsPreview); + } + /// /// Creates a reaction for a specified Issue /// @@ -42,19 +70,16 @@ namespace Octokit.Reactive } /// - /// List reactions for a specified Issue + /// Creates a reaction for a specified Issue. /// - /// https://developer.github.com/v3/reactions/#list-reactions-for-an-issue - /// The owner of the repository - /// The name of the repository - /// The issue id - /// An representing s for a specified issue. - public IObservable GetAll(string owner, string name, int number) + /// https://developer.github.com/v3/reactions/#create-reaction-for-an-issue + /// The ID of the repository + /// The issue id + /// The reaction to create + /// An representing created for a specified issue. + public IObservable Create(int repositoryId, int number, NewReaction reaction) { - Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); - Ensure.ArgumentNotNullOrEmptyString(name, "name"); - - return _connection.GetAndFlattenAllPages(ApiUrls.IssueReactions(owner, name, number), null, AcceptHeaders.ReactionsPreview); + return _client.Create(repositoryId, number, reaction).ToObservable(); } } } diff --git a/Octokit/Clients/IIssueReactionsClient.cs b/Octokit/Clients/IIssueReactionsClient.cs index 5860daa0..9a5c501e 100644 --- a/Octokit/Clients/IIssueReactionsClient.cs +++ b/Octokit/Clients/IIssueReactionsClient.cs @@ -21,6 +21,15 @@ namespace Octokit /// A of representing s for a specified issue. Task> GetAll(string owner, string name, int number); + /// + /// Get all reactions for a specified Issue + /// + /// https://developer.github.com/v3/reactions/#list-reactions-for-an-issue + /// The ID of the repository + /// The issue id + /// A of representing s for a specified issue. + Task> GetAll(int repositoryId, int number); + /// /// Creates a reaction for a specified Issue /// @@ -31,5 +40,15 @@ namespace Octokit /// The reaction to create /// A representing created for a specified issue. Task Create(string owner, string name, int number, NewReaction reaction); + + /// + /// Creates a reaction for a specified Issue + /// + /// https://developer.github.com/v3/reactions/#create-reaction-for-an-issue + /// The ID of the repository + /// The issue id + /// The reaction to create + /// A representing created for a specified issue. + Task Create(int repositoryId, int number, NewReaction reaction); } } diff --git a/Octokit/Clients/IssueReactionsClient.cs b/Octokit/Clients/IssueReactionsClient.cs index dc57f21b..30874053 100644 --- a/Octokit/Clients/IssueReactionsClient.cs +++ b/Octokit/Clients/IssueReactionsClient.cs @@ -16,6 +16,34 @@ namespace Octokit { } + /// + /// Get all reactions for a specified Issue + /// + /// https://developer.github.com/v3/reactions/#list-reactions-for-an-issue + /// The owner of the repository + /// The name of the repository + /// The issue id + /// A of representing s for a specified issue. + public Task> GetAll(string owner, string name, int number) + { + Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); + Ensure.ArgumentNotNullOrEmptyString(name, "name"); + + return ApiConnection.GetAll(ApiUrls.IssueReactions(owner, name, number), AcceptHeaders.ReactionsPreview); + } + + /// + /// Get all reactions for a specified Issue + /// + /// https://developer.github.com/v3/reactions/#list-reactions-for-an-issue + /// The ID of the repository + /// The issue id + /// A of representing s for a specified issue. + public Task> GetAll(int repositoryId, int number) + { + return ApiConnection.GetAll(ApiUrls.IssueReactions(repositoryId, number), AcceptHeaders.ReactionsPreview); + } + /// /// Creates a reaction for a specified Issue /// @@ -35,19 +63,18 @@ namespace Octokit } /// - /// Get all reactions for a specified Issue + /// Creates a reaction for a specified Issue /// - /// https://developer.github.com/v3/reactions/#list-reactions-for-an-issue - /// The owner of the repository - /// The name of the repository - /// The issue id - /// A of representing s for a specified issue. - public Task> GetAll(string owner, string name, int number) + /// https://developer.github.com/v3/reactions/#create-reaction-for-an-issue + /// The ID of the repository + /// The issue id + /// The reaction to create + /// A representing created for a specified issue. + public Task Create(int repositoryId, int number, NewReaction reaction) { - Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); - Ensure.ArgumentNotNullOrEmptyString(name, "name"); + Ensure.ArgumentNotNull(reaction, "reaction"); - return ApiConnection.GetAll(ApiUrls.IssueReactions(owner, name, number), AcceptHeaders.ReactionsPreview); + return ApiConnection.Post(ApiUrls.IssueReactions(repositoryId, number), reaction, AcceptHeaders.ReactionsPreview); } } } From afab64b66e91957d9450b302c0644d5038ae4b95 Mon Sep 17 00:00:00 2001 From: "aedampir@gmail.com" Date: Wed, 15 Jun 2016 18:13:04 +0700 Subject: [PATCH 06/13] added new unit tests --- .../Clients/IssueReactionsClientTests.cs | 60 +++++++++++++--- .../ObservableIssueReactionsClientTests.cs | 71 ++++++++++++++----- 2 files changed, 102 insertions(+), 29 deletions(-) diff --git a/Octokit.Tests/Clients/IssueReactionsClientTests.cs b/Octokit.Tests/Clients/IssueReactionsClientTests.cs index 43c86aa3..2e36cd71 100644 --- a/Octokit.Tests/Clients/IssueReactionsClientTests.cs +++ b/Octokit.Tests/Clients/IssueReactionsClientTests.cs @@ -22,24 +22,35 @@ namespace Octokit.Tests.Clients public async Task RequestsCorrectUrl() { var connection = Substitute.For(); - var client = new ReactionsClient(connection); + var client = new IssueReactionsClient(connection); - client.Issue.GetAll("fake", "repo", 42); + await client.GetAll("fake", "repo", 42); connection.Received().GetAll(Arg.Is(u => u.ToString() == "repos/fake/repo/issues/42/reactions"), "application/vnd.github.squirrel-girl-preview"); } [Fact] - public async Task EnsuresArgumentsNotNull() + public async Task RequestsCorrectUrlWithRepositoryId() + { + var connection = Substitute.For(); + var client = new IssueReactionsClient(connection); + + await client.GetAll(1, 42); + + connection.Received().GetAll(Arg.Is(u => u.ToString() == "repositories/1/issues/42/reactions"), "application/vnd.github.squirrel-girl-preview"); + } + + [Fact] + public async Task EnsuresNonNullArguments() { var connection = Substitute.For(); var client = new ReactionsClient(connection); - await Assert.ThrowsAsync(() => client.Issue.Create(null, "name", 1, new NewReaction(ReactionType.Heart))); - await Assert.ThrowsAsync(() => client.Issue.Create("", "name", 1, new NewReaction(ReactionType.Heart))); - await Assert.ThrowsAsync(() => client.Issue.Create("owner", null, 1, new NewReaction(ReactionType.Heart))); - await Assert.ThrowsAsync(() => client.Issue.Create("owner", "", 1, new NewReaction(ReactionType.Heart))); - await Assert.ThrowsAsync(() => client.Issue.Create("owner", "name", 1, null)); + await Assert.ThrowsAsync(() => client.Issue.GetAll(null, "name", 1)); + await Assert.ThrowsAsync(() => client.Issue.GetAll("owner", null, 1)); + + await Assert.ThrowsAsync(() => client.Issue.GetAll("", "name", 1)); + await Assert.ThrowsAsync(() => client.Issue.GetAll("owner", "", 1)); } } @@ -51,12 +62,41 @@ namespace Octokit.Tests.Clients NewReaction newReaction = new NewReaction(ReactionType.Heart); var connection = Substitute.For(); - var client = new ReactionsClient(connection); + var client = new IssueReactionsClient(connection); - client.Issue.Create("fake", "repo", 1, newReaction); + client.Create("fake", "repo", 1, newReaction); connection.Received().Post(Arg.Is(u => u.ToString() == "repos/fake/repo/issues/1/reactions"), Arg.Any(), "application/vnd.github.squirrel-girl-preview"); } + + [Fact] + public void RequestsCorrectUrlWithRepositoryId() + { + NewReaction newReaction = new NewReaction(ReactionType.Heart); + + var connection = Substitute.For(); + var client = new IssueReactionsClient(connection); + + client.Create(1, 1, newReaction); + + connection.Received().Post(Arg.Is(u => u.ToString() == "repositories/1/issues/1/reactions"), Arg.Any(), "application/vnd.github.squirrel-girl-preview"); + } + + [Fact] + public async Task EnsuresNonNullArguments() + { + var connection = Substitute.For(); + var client = new ReactionsClient(connection); + + await Assert.ThrowsAsync(() => client.Issue.Create(null, "name", 1, new NewReaction(ReactionType.Heart))); + await Assert.ThrowsAsync(() => client.Issue.Create("owner", null, 1, new NewReaction(ReactionType.Heart))); + await Assert.ThrowsAsync(() => client.Issue.Create("owner", "name", 1, null)); + + await Assert.ThrowsAsync(() => client.Issue.Create(1, 1, null)); + + await Assert.ThrowsAsync(() => client.Issue.Create("", "name", 1, new NewReaction(ReactionType.Heart))); + await Assert.ThrowsAsync(() => client.Issue.Create("owner", "", 1, new NewReaction(ReactionType.Heart))); + } } } } diff --git a/Octokit.Tests/Reactive/ObservableIssueReactionsClientTests.cs b/Octokit.Tests/Reactive/ObservableIssueReactionsClientTests.cs index 08d51994..8c7f987b 100644 --- a/Octokit.Tests/Reactive/ObservableIssueReactionsClientTests.cs +++ b/Octokit.Tests/Reactive/ObservableIssueReactionsClientTests.cs @@ -18,33 +18,37 @@ 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.Issue.GetAll("fake", "repo", 42); - _githubClient.Received().Reaction.Issue.GetAll("fake", "repo", 42); + var gitHubClient = Substitute.For(); + var client = new ObservableIssueReactionsClient(gitHubClient); + + client.GetAll("fake", "repo", 42); + gitHubClient.Received().Reaction.Issue.GetAll("fake", "repo", 42); } [Fact] - public void EnsuresArgumentsNotNull() + public void RequestsCorrectUrlWithRepositoryId() { + var gitHubClient = Substitute.For(); + var client = new ObservableIssueReactionsClient(gitHubClient); - Assert.Throws(() => _client.Issue.Create(null, "name", 1, new NewReaction(ReactionType.Heart))); - Assert.Throws(() => _client.Issue.Create("", "name", 1, new NewReaction(ReactionType.Heart))); - Assert.Throws(() => _client.Issue.Create("owner", null, 1, new NewReaction(ReactionType.Heart))); - Assert.Throws(() => _client.Issue.Create("owner", "", 1, new NewReaction(ReactionType.Heart))); - Assert.Throws(() => _client.Issue.Create("owner", "name", 1, null)); + client.GetAll(1, 42); + gitHubClient.Received().Reaction.Issue.GetAll(1, 42); + } + + [Fact] + public void EnsuresNonNullArguments() + { + var gitHubClient = Substitute.For(); + var client = new ObservableIssueReactionsClient(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)); } } @@ -58,8 +62,37 @@ namespace Octokit.Tests.Reactive var newReaction = new NewReaction(ReactionType.Confused); client.Issue.Create("fake", "repo", 1, newReaction); + githubClient.Received().Reaction.Issue.Create("fake", "repo", 1, newReaction); } + + [Fact] + public void RequestsCorrectUrlWithRepositoryId() + { + var githubClient = Substitute.For(); + var client = new ObservableReactionsClient(githubClient); + var newReaction = new NewReaction(ReactionType.Confused); + + client.Issue.Create(1, 1, newReaction); + + githubClient.Received().Reaction.Issue.Create(1, 1, newReaction); + } + + [Fact] + public void EnsuresNonNullArguments() + { + var gitHubClient = Substitute.For(); + var client = new ObservableIssueReactionsClient(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 f7281247a2b297da94f0b55a78f79dd138cc25f1 Mon Sep 17 00:00:00 2001 From: "aedampir@gmail.com" Date: Wed, 15 Jun 2016 18:13:54 +0700 Subject: [PATCH 07/13] added null check in ObservableIssueReactionsClient --- Octokit.Reactive/Clients/ObservableIssueReactionsClient.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Octokit.Reactive/Clients/ObservableIssueReactionsClient.cs b/Octokit.Reactive/Clients/ObservableIssueReactionsClient.cs index 7249abdc..e52ca42e 100644 --- a/Octokit.Reactive/Clients/ObservableIssueReactionsClient.cs +++ b/Octokit.Reactive/Clients/ObservableIssueReactionsClient.cs @@ -79,6 +79,8 @@ namespace Octokit.Reactive /// An representing created for a specified issue. public IObservable Create(int repositoryId, int number, NewReaction reaction) { + Ensure.ArgumentNotNull(reaction, "reaction"); + return _client.Create(repositoryId, number, reaction).ToObservable(); } } From 9ca231bb2722a50a7ecd602aba079b8314c4b380 Mon Sep 17 00:00:00 2001 From: "aedampir@gmail.com" Date: Wed, 15 Jun 2016 18:18:41 +0700 Subject: [PATCH 08/13] added new integration tests --- .../Clients/IssueReactionsClientTests.cs | 66 +++++++++++++++++-- 1 file changed, 61 insertions(+), 5 deletions(-) diff --git a/Octokit.Tests.Integration/Clients/IssueReactionsClientTests.cs b/Octokit.Tests.Integration/Clients/IssueReactionsClientTests.cs index 32f263fa..d689cee6 100644 --- a/Octokit.Tests.Integration/Clients/IssueReactionsClientTests.cs +++ b/Octokit.Tests.Integration/Clients/IssueReactionsClientTests.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 IssueReactionsClientTests @@ -16,11 +16,49 @@ public class IssueReactionsClientTests public TheCreateReactionMethod() { _github = Helper.GetAuthenticatedClient(); - var repoName = Helper.MakeNameWithTimestamp("public-repo"); + _issuesClient = _github.Issue; + + var repoName = Helper.MakeNameWithTimestamp("public-repo"); _context = _github.CreateRepositoryContext(new NewRepository(repoName)).Result; } + [IntegrationTest] + public async Task CanListReactions() + { + var newIssue = new NewIssue("a test issue") { Body = "A new unassigned issue" }; + var issue = await _issuesClient.Create(_context.RepositoryOwner, _context.RepositoryName, newIssue); + + Assert.NotNull(issue); + + var issueReaction = await _github.Reaction.Issue.Create(_context.RepositoryOwner, _context.RepositoryName, issue.Number, new NewReaction(ReactionType.Heart)); + + var issueReactions = await _github.Reaction.Issue.GetAll(_context.RepositoryOwner, _context.RepositoryName, issue.Number); + + Assert.NotEmpty(issueReactions); + + Assert.Equal(issueReaction.Id, issueReactions[0].Id); + Assert.Equal(issueReaction.Content, issueReactions[0].Content); + } + + [IntegrationTest] + public async Task CanListReactionsWithRepositoryId() + { + var newIssue = new NewIssue("a test issue") { Body = "A new unassigned issue" }; + var issue = await _issuesClient.Create(_context.RepositoryOwner, _context.RepositoryName, newIssue); + + Assert.NotNull(issue); + + var issueReaction = await _github.Reaction.Issue.Create(_context.RepositoryOwner, _context.RepositoryName, issue.Number, new NewReaction(ReactionType.Heart)); + + var issueReactions = await _github.Reaction.Issue.GetAll(_context.Repository.Id, issue.Number); + + Assert.NotEmpty(issueReactions); + + Assert.Equal(issueReaction.Id, issueReactions[0].Id); + Assert.Equal(issueReaction.Content, issueReactions[0].Content); + } + [IntegrationTest] public async Task CanCreateReaction() { @@ -40,10 +78,28 @@ public class IssueReactionsClientTests Assert.Equal(issue.User.Id, issueReaction.User.Id); } + [IntegrationTest] + public async Task CanCreateReactionWithRepositoryId() + { + var newIssue = new NewIssue("a test issue") { Body = "A new unassigned issue" }; + var issue = await _issuesClient.Create(_context.RepositoryOwner, _context.RepositoryName, newIssue); + + Assert.NotNull(issue); + + var issueReaction = await _github.Reaction.Issue.Create(_context.Repository.Id, issue.Number, new NewReaction(ReactionType.Heart)); + + Assert.NotNull(issueReaction); + + Assert.IsType(issueReaction); + + Assert.Equal(ReactionType.Heart, issueReaction.Content); + + Assert.Equal(issue.User.Id, issueReaction.User.Id); + } + public void Dispose() { _context.Dispose(); } } } - From 1045e55fed4530be035f23c2e2f7d2c55f96730d Mon Sep 17 00:00:00 2001 From: "aedampir@gmail.com" Date: Wed, 15 Jun 2016 18:19:17 +0700 Subject: [PATCH 09/13] reordered usings --- Octokit.Tests/Clients/IssueReactionsClientTests.cs | 4 ++-- Octokit.Tests/Reactive/ObservableIssueReactionsClientTests.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Octokit.Tests/Clients/IssueReactionsClientTests.cs b/Octokit.Tests/Clients/IssueReactionsClientTests.cs index 2e36cd71..83debe60 100644 --- a/Octokit.Tests/Clients/IssueReactionsClientTests.cs +++ b/Octokit.Tests/Clients/IssueReactionsClientTests.cs @@ -1,6 +1,6 @@ -using NSubstitute; -using System; +using System; using System.Threading.Tasks; +using NSubstitute; using Xunit; namespace Octokit.Tests.Clients diff --git a/Octokit.Tests/Reactive/ObservableIssueReactionsClientTests.cs b/Octokit.Tests/Reactive/ObservableIssueReactionsClientTests.cs index 8c7f987b..1e476494 100644 --- a/Octokit.Tests/Reactive/ObservableIssueReactionsClientTests.cs +++ b/Octokit.Tests/Reactive/ObservableIssueReactionsClientTests.cs @@ -1,6 +1,6 @@ -using NSubstitute; +using System; +using NSubstitute; using Octokit.Reactive; -using System; using Xunit; namespace Octokit.Tests.Reactive From 1fb00fba4e8592c40c405edf46360fd46dee1cf8 Mon Sep 17 00:00:00 2001 From: "aedampir@gmail.com" Date: Wed, 15 Jun 2016 18:34:17 +0700 Subject: [PATCH 10/13] modified XML docs --- .../Clients/IObservableIssueReactionsClient.cs | 10 +++++----- .../Clients/ObservableIssueReactionsClient.cs | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Octokit.Reactive/Clients/IObservableIssueReactionsClient.cs b/Octokit.Reactive/Clients/IObservableIssueReactionsClient.cs index 03aa0e90..e26aa65a 100644 --- a/Octokit.Reactive/Clients/IObservableIssueReactionsClient.cs +++ b/Octokit.Reactive/Clients/IObservableIssueReactionsClient.cs @@ -17,16 +17,16 @@ namespace Octokit.Reactive /// The owner of the repository /// The name of the repository /// The issue id - /// An representing s for a specified issue. + /// An representing s for a specified issue. IObservable GetAll(string owner, string name, int number); - + /// /// List reactions for a specified Issue. /// /// https://developer.github.com/v3/reactions/#list-reactions-for-an-issue /// The ID of the repository /// The issue id - /// An representing s for a specified issue. + /// An representing s for a specified issue. IObservable GetAll(int repositoryId, int number); /// @@ -37,7 +37,7 @@ namespace Octokit.Reactive /// The name of the repository /// The issue id /// The reaction to create - /// An representing created for a specified issue. + /// An representing created for a specified issue. IObservable Create(string owner, string name, int number, NewReaction reaction); /// @@ -47,7 +47,7 @@ namespace Octokit.Reactive /// The ID of the repository /// The issue id /// The reaction to create - /// An representing created for a specified issue. + /// An representing created for a specified issue. IObservable Create(int repositoryId, int number, NewReaction reaction); } } diff --git a/Octokit.Reactive/Clients/ObservableIssueReactionsClient.cs b/Octokit.Reactive/Clients/ObservableIssueReactionsClient.cs index e52ca42e..dc0c8763 100644 --- a/Octokit.Reactive/Clients/ObservableIssueReactionsClient.cs +++ b/Octokit.Reactive/Clients/ObservableIssueReactionsClient.cs @@ -30,7 +30,7 @@ namespace Octokit.Reactive /// The owner of the repository /// The name of the repository /// The issue id - /// An representing s for a specified issue. + /// An representing s for a specified issue. 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-an-issue /// The ID of the repository /// The issue id - /// An representing s for a specified issue. + /// An representing s for a specified issue. public IObservable GetAll(int repositoryId, int number) { return _connection.GetAndFlattenAllPages(ApiUrls.IssueReactions(repositoryId, number), null, AcceptHeaders.ReactionsPreview); @@ -59,7 +59,7 @@ namespace Octokit.Reactive /// The name of the repository /// The issue id /// The reaction to create - /// An representing created for a specified issue. + /// An representing created for a specified issue. public IObservable Create(string owner, string name, int number, NewReaction reaction) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); @@ -76,7 +76,7 @@ namespace Octokit.Reactive /// The ID of the repository /// The issue id /// The reaction to create - /// An representing created for a specified issue. + /// An representing created for a specified issue. public IObservable Create(int repositoryId, int number, NewReaction reaction) { Ensure.ArgumentNotNull(reaction, "reaction"); From ed886088fd94d010c89104d56a188c7a1268c5b5 Mon Sep 17 00:00:00 2001 From: "aedampir@gmail.com" Date: Wed, 15 Jun 2016 18:57:50 +0700 Subject: [PATCH 11/13] modified unit tests --- Octokit.Tests/Clients/IssueReactionsClientTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Octokit.Tests/Clients/IssueReactionsClientTests.cs b/Octokit.Tests/Clients/IssueReactionsClientTests.cs index 83debe60..3c0ab6be 100644 --- a/Octokit.Tests/Clients/IssueReactionsClientTests.cs +++ b/Octokit.Tests/Clients/IssueReactionsClientTests.cs @@ -66,7 +66,7 @@ namespace Octokit.Tests.Clients client.Create("fake", "repo", 1, newReaction); - connection.Received().Post(Arg.Is(u => u.ToString() == "repos/fake/repo/issues/1/reactions"), Arg.Any(), "application/vnd.github.squirrel-girl-preview"); + connection.Received().Post(Arg.Is(u => u.ToString() == "repos/fake/repo/issues/1/reactions"), newReaction, "application/vnd.github.squirrel-girl-preview"); } [Fact] @@ -79,7 +79,7 @@ namespace Octokit.Tests.Clients client.Create(1, 1, newReaction); - connection.Received().Post(Arg.Is(u => u.ToString() == "repositories/1/issues/1/reactions"), Arg.Any(), "application/vnd.github.squirrel-girl-preview"); + connection.Received().Post(Arg.Is(u => u.ToString() == "repositories/1/issues/1/reactions"), newReaction, "application/vnd.github.squirrel-girl-preview"); } [Fact] From eb1d620458b9f872c53f6dbce5e32561d08f1bf2 Mon Sep 17 00:00:00 2001 From: Alexander Efremov Date: Fri, 17 Jun 2016 06:12:20 +0700 Subject: [PATCH 12/13] cleared tags --- .../Clients/IObservableIssueReactionsClient.cs | 8 ++++---- .../Clients/ObservableIssueReactionsClient.cs | 8 ++++---- Octokit/Clients/IIssueReactionsClient.cs | 8 ++++---- Octokit/Clients/IssueReactionsClient.cs | 8 ++++---- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Octokit.Reactive/Clients/IObservableIssueReactionsClient.cs b/Octokit.Reactive/Clients/IObservableIssueReactionsClient.cs index e26aa65a..539e3c3a 100644 --- a/Octokit.Reactive/Clients/IObservableIssueReactionsClient.cs +++ b/Octokit.Reactive/Clients/IObservableIssueReactionsClient.cs @@ -17,7 +17,7 @@ namespace Octokit.Reactive /// The owner of the repository /// The name of the repository /// The issue id - /// An representing s for a specified issue. + /// IObservable GetAll(string owner, string name, int number); /// @@ -26,7 +26,7 @@ namespace Octokit.Reactive /// https://developer.github.com/v3/reactions/#list-reactions-for-an-issue /// The ID of the repository /// The issue id - /// An representing s for a specified issue. + /// IObservable GetAll(int repositoryId, int number); /// @@ -37,7 +37,7 @@ namespace Octokit.Reactive /// The name of the repository /// The issue id /// The reaction to create - /// An representing created for a specified issue. + /// IObservable Create(string owner, string name, int number, NewReaction reaction); /// @@ -47,7 +47,7 @@ namespace Octokit.Reactive /// The ID of the repository /// The issue id /// The reaction to create - /// An representing created for a specified issue. + /// IObservable Create(int repositoryId, int number, NewReaction reaction); } } diff --git a/Octokit.Reactive/Clients/ObservableIssueReactionsClient.cs b/Octokit.Reactive/Clients/ObservableIssueReactionsClient.cs index dc0c8763..59c2f77b 100644 --- a/Octokit.Reactive/Clients/ObservableIssueReactionsClient.cs +++ b/Octokit.Reactive/Clients/ObservableIssueReactionsClient.cs @@ -30,7 +30,7 @@ namespace Octokit.Reactive /// The owner of the repository /// The name of the repository /// The issue id - /// An representing s for a specified issue. + /// 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-an-issue /// The ID of the repository /// The issue id - /// An representing s for a specified issue. + /// public IObservable GetAll(int repositoryId, int number) { return _connection.GetAndFlattenAllPages(ApiUrls.IssueReactions(repositoryId, number), null, AcceptHeaders.ReactionsPreview); @@ -59,7 +59,7 @@ namespace Octokit.Reactive /// The name of the repository /// The issue id /// The reaction to create - /// An representing created for a specified issue. + /// public IObservable Create(string owner, string name, int number, NewReaction reaction) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); @@ -76,7 +76,7 @@ namespace Octokit.Reactive /// The ID of the repository /// The issue id /// The reaction to create - /// An representing created for a specified issue. + /// public IObservable Create(int repositoryId, int number, NewReaction reaction) { Ensure.ArgumentNotNull(reaction, "reaction"); diff --git a/Octokit/Clients/IIssueReactionsClient.cs b/Octokit/Clients/IIssueReactionsClient.cs index 9a5c501e..9a62d5bd 100644 --- a/Octokit/Clients/IIssueReactionsClient.cs +++ b/Octokit/Clients/IIssueReactionsClient.cs @@ -18,7 +18,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// The issue id - /// A of representing s for a specified issue. + /// Task> GetAll(string owner, string name, int number); /// @@ -27,7 +27,7 @@ namespace Octokit /// https://developer.github.com/v3/reactions/#list-reactions-for-an-issue /// The ID of the repository /// The issue id - /// A of representing s for a specified issue. + /// Task> GetAll(int repositoryId, int number); /// @@ -38,7 +38,7 @@ namespace Octokit /// The name of the repository /// The issue id /// The reaction to create - /// A representing created for a specified issue. + /// Task Create(string owner, string name, int number, NewReaction reaction); /// @@ -48,7 +48,7 @@ namespace Octokit /// The ID of the repository /// The issue id /// The reaction to create - /// A representing created for a specified issue. + /// Task Create(int repositoryId, int number, NewReaction reaction); } } diff --git a/Octokit/Clients/IssueReactionsClient.cs b/Octokit/Clients/IssueReactionsClient.cs index 30874053..8919a77f 100644 --- a/Octokit/Clients/IssueReactionsClient.cs +++ b/Octokit/Clients/IssueReactionsClient.cs @@ -23,7 +23,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// The issue id - /// A of representing s for a specified issue. + /// 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-an-issue /// The ID of the repository /// The issue id - /// A of representing s for a specified issue. + /// public Task> GetAll(int repositoryId, int number) { return ApiConnection.GetAll(ApiUrls.IssueReactions(repositoryId, number), AcceptHeaders.ReactionsPreview); @@ -52,7 +52,7 @@ namespace Octokit /// The name of the repository /// The issue id /// The reaction to create - /// A representing created for a specified issue. + /// 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 issue id /// The reaction to create - /// A representing created for a specified issue. + /// public Task Create(int repositoryId, int number, NewReaction reaction) { Ensure.ArgumentNotNull(reaction, "reaction"); From 26ba6ddf25150c80ec651f54e8c642e47a17439f Mon Sep 17 00:00:00 2001 From: "aedampir@gmail.com" Date: Wed, 6 Jul 2016 02:38:05 +0700 Subject: [PATCH 13/13] burned tags --- Octokit.Reactive/Clients/IObservableIssueReactionsClient.cs | 4 ---- Octokit.Reactive/Clients/ObservableIssueReactionsClient.cs | 4 ---- Octokit/Clients/IIssueReactionsClient.cs | 4 ---- Octokit/Clients/IssueReactionsClient.cs | 4 ---- 4 files changed, 16 deletions(-) diff --git a/Octokit.Reactive/Clients/IObservableIssueReactionsClient.cs b/Octokit.Reactive/Clients/IObservableIssueReactionsClient.cs index 539e3c3a..91f0bb6e 100644 --- a/Octokit.Reactive/Clients/IObservableIssueReactionsClient.cs +++ b/Octokit.Reactive/Clients/IObservableIssueReactionsClient.cs @@ -17,7 +17,6 @@ namespace Octokit.Reactive /// The owner of the repository /// The name of the repository /// The issue 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-an-issue /// The ID of the repository /// The issue id - /// IObservable GetAll(int repositoryId, int number); /// @@ -37,7 +35,6 @@ namespace Octokit.Reactive /// The name of the repository /// The issue id /// The reaction to create - /// IObservable Create(string owner, string name, int number, NewReaction reaction); /// @@ -47,7 +44,6 @@ namespace Octokit.Reactive /// The ID of the repository /// The issue id /// The reaction to create - /// IObservable Create(int repositoryId, int number, NewReaction reaction); } } diff --git a/Octokit.Reactive/Clients/ObservableIssueReactionsClient.cs b/Octokit.Reactive/Clients/ObservableIssueReactionsClient.cs index 59c2f77b..2f7acc34 100644 --- a/Octokit.Reactive/Clients/ObservableIssueReactionsClient.cs +++ b/Octokit.Reactive/Clients/ObservableIssueReactionsClient.cs @@ -30,7 +30,6 @@ namespace Octokit.Reactive /// The owner of the repository /// The name of the repository /// The issue 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-an-issue /// The ID of the repository /// The issue id - /// public IObservable GetAll(int repositoryId, int number) { return _connection.GetAndFlattenAllPages(ApiUrls.IssueReactions(repositoryId, number), null, AcceptHeaders.ReactionsPreview); @@ -59,7 +57,6 @@ namespace Octokit.Reactive /// The name of the repository /// The issue 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 ID of the repository /// The issue id /// The reaction to create - /// public IObservable Create(int repositoryId, int number, NewReaction reaction) { Ensure.ArgumentNotNull(reaction, "reaction"); diff --git a/Octokit/Clients/IIssueReactionsClient.cs b/Octokit/Clients/IIssueReactionsClient.cs index 9a62d5bd..81f95479 100644 --- a/Octokit/Clients/IIssueReactionsClient.cs +++ b/Octokit/Clients/IIssueReactionsClient.cs @@ -18,7 +18,6 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// The issue id - /// Task> GetAll(string owner, string name, int number); /// @@ -27,7 +26,6 @@ namespace Octokit /// https://developer.github.com/v3/reactions/#list-reactions-for-an-issue /// The ID of the repository /// The issue id - /// Task> GetAll(int repositoryId, int number); /// @@ -38,7 +36,6 @@ namespace Octokit /// The name of the repository /// The issue 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 issue id /// The reaction to create - /// Task Create(int repositoryId, int number, NewReaction reaction); } } diff --git a/Octokit/Clients/IssueReactionsClient.cs b/Octokit/Clients/IssueReactionsClient.cs index 8919a77f..e3652a04 100644 --- a/Octokit/Clients/IssueReactionsClient.cs +++ b/Octokit/Clients/IssueReactionsClient.cs @@ -23,7 +23,6 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// The issue 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-an-issue /// The ID of the repository /// The issue id - /// public Task> GetAll(int repositoryId, int number) { return ApiConnection.GetAll(ApiUrls.IssueReactions(repositoryId, number), AcceptHeaders.ReactionsPreview); @@ -52,7 +50,6 @@ namespace Octokit /// The name of the repository /// The issue 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 issue id /// The reaction to create - /// public Task Create(int repositoryId, int number, NewReaction reaction) { Ensure.ArgumentNotNull(reaction, "reaction");