diff --git a/Octokit.Reactive/Clients/IObservablePullRequestsClient.cs b/Octokit.Reactive/Clients/IObservablePullRequestsClient.cs
index 752024be3f..ad5dd7c97a 100644
--- a/Octokit.Reactive/Clients/IObservablePullRequestsClient.cs
+++ b/Octokit.Reactive/Clients/IObservablePullRequestsClient.cs
@@ -12,10 +12,16 @@ namespace Octokit.Reactive
public interface IObservablePullRequestsClient
{
///
- /// Client for managing comments.
+ /// Client for managing review comments.
///
+ [Obsolete("Please use IObservablePullRequestsClient.ReviewComment. This will be removed in a future version")]
IObservablePullRequestReviewCommentsClient Comment { get; }
+ ///
+ /// Client for managing review comments.
+ ///
+ IObservablePullRequestReviewCommentsClient ReviewComment { get; }
+
///
/// Gets a single Pull Request by number.
///
diff --git a/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentsClient.cs b/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentsClient.cs
index 89bb8ea0c8..4caefcd4f4 100644
--- a/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentsClient.cs
+++ b/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentsClient.cs
@@ -20,7 +20,7 @@ public ObservablePullRequestReviewCommentsClient(IGitHubClient client)
{
Ensure.ArgumentNotNull(client, "client");
- _client = client.PullRequest.Comment;
+ _client = client.PullRequest.ReviewComment;
_connection = client.Connection;
}
diff --git a/Octokit.Reactive/Clients/ObservablePullRequestsClient.cs b/Octokit.Reactive/Clients/ObservablePullRequestsClient.cs
index be36824697..912d0fe293 100644
--- a/Octokit.Reactive/Clients/ObservablePullRequestsClient.cs
+++ b/Octokit.Reactive/Clients/ObservablePullRequestsClient.cs
@@ -16,9 +16,15 @@ public class ObservablePullRequestsClient : IObservablePullRequestsClient
readonly IConnection _connection;
///
- /// Client for managing comments.
+ /// Client for managing review comments.
///
- public IObservablePullRequestReviewCommentsClient Comment { get; private set; }
+ [Obsolete("Please use ObservablePullRequestsClient.ReviewComment. This will be removed in a future version")]
+ public IObservablePullRequestReviewCommentsClient Comment { get { return this.ReviewComment; } }
+
+ ///
+ /// Client for managing review comments.
+ ///
+ public IObservablePullRequestReviewCommentsClient ReviewComment { get; private set; }
public ObservablePullRequestsClient(IGitHubClient client)
{
@@ -26,7 +32,7 @@ public ObservablePullRequestsClient(IGitHubClient client)
_client = client.Repository.PullRequest;
_connection = client.Connection;
- Comment = new ObservablePullRequestReviewCommentsClient(client);
+ ReviewComment = new ObservablePullRequestReviewCommentsClient(client);
}
///
diff --git a/Octokit.Tests.Integration/Clients/PullRequestReviewCommentReactionsClientTests.cs b/Octokit.Tests.Integration/Clients/PullRequestReviewCommentReactionsClientTests.cs
index 92f21dc963..4044adde88 100644
--- a/Octokit.Tests.Integration/Clients/PullRequestReviewCommentReactionsClientTests.cs
+++ b/Octokit.Tests.Integration/Clients/PullRequestReviewCommentReactionsClientTests.cs
@@ -20,7 +20,7 @@ public PullRequestReviewCommentReactionsClientTests()
{
_github = Helper.GetAuthenticatedClient();
- _client = _github.PullRequest.Comment;
+ _client = _github.PullRequest.ReviewComment;
// We'll create a pull request that can be used by most tests
_context = _github.CreateRepositoryContext("test-repo").Result;
diff --git a/Octokit.Tests.Integration/Clients/PullRequestReviewCommentsClientTests.cs b/Octokit.Tests.Integration/Clients/PullRequestReviewCommentsClientTests.cs
index 86c9c14ad7..ac9ab891bd 100644
--- a/Octokit.Tests.Integration/Clients/PullRequestReviewCommentsClientTests.cs
+++ b/Octokit.Tests.Integration/Clients/PullRequestReviewCommentsClientTests.cs
@@ -20,7 +20,7 @@ public PullRequestReviewCommentsClientTests()
{
_github = Helper.GetAuthenticatedClient();
- _client = _github.PullRequest.Comment;
+ _client = _github.PullRequest.ReviewComment;
// We'll create a pull request that can be used by most tests
_context = _github.CreateRepositoryContext("test-repo").Result;
diff --git a/Octokit.Tests/Reactive/ObservablePullRequestReviewCommentsClientTests.cs b/Octokit.Tests/Reactive/ObservablePullRequestReviewCommentsClientTests.cs
index 7e637dbdec..4afdee43b4 100644
--- a/Octokit.Tests/Reactive/ObservablePullRequestReviewCommentsClientTests.cs
+++ b/Octokit.Tests/Reactive/ObservablePullRequestReviewCommentsClientTests.cs
@@ -38,7 +38,7 @@ public void RequestsCorrectUrl()
client.GetAll("fake", "repo", 1);
- gitHubClient.Received().PullRequest.Comment.GetAll("fake", "repo", 1);
+ gitHubClient.Received().PullRequest.ReviewComment.GetAll("fake", "repo", 1);
}
[Fact]
@@ -49,7 +49,7 @@ public void RequestsCorrectUrlWithRepositoryId()
client.GetAll(1, 1);
- gitHubClient.Received().PullRequest.Comment.GetAll(1, 1);
+ gitHubClient.Received().PullRequest.ReviewComment.GetAll(1, 1);
}
[Fact]
@@ -67,7 +67,7 @@ public void RequestsCorrectUrlWithApiOptions()
client.GetAll("fake", "repo", 1, options);
- gitHubClient.Received().PullRequest.Comment.GetAll("fake", "repo", 1, options);
+ gitHubClient.Received().PullRequest.ReviewComment.GetAll("fake", "repo", 1, options);
}
[Fact]
@@ -85,7 +85,7 @@ public void RequestsCorrectUrlWithApiOptionsWithRepositoryId()
client.GetAll(1, 1, options);
- gitHubClient.Received().PullRequest.Comment.GetAll(1, 1, options);
+ gitHubClient.Received().PullRequest.ReviewComment.GetAll(1, 1, options);
}
[Fact]
@@ -237,7 +237,7 @@ public void RequestsCorrectUrl()
client.GetAllForRepository("fake", "repo", request);
- gitHubClient.Received().PullRequest.Comment.GetAllForRepository("fake", "repo", request);
+ gitHubClient.Received().PullRequest.ReviewComment.GetAllForRepository("fake", "repo", request);
}
[Fact]
@@ -255,7 +255,7 @@ public void RequestsCorrectUrlWithRepositoryId()
client.GetAllForRepository(1, request);
- gitHubClient.Received().PullRequest.Comment.GetAllForRepository(1, request);
+ gitHubClient.Received().PullRequest.ReviewComment.GetAllForRepository(1, request);
}
[Fact]
@@ -280,7 +280,7 @@ public void RequestsCorrectUrlWithApiOptions()
client.GetAllForRepository("fake", "repo", request, options);
- gitHubClient.Received().PullRequest.Comment.GetAllForRepository("fake", "repo", request, options);
+ gitHubClient.Received().PullRequest.ReviewComment.GetAllForRepository("fake", "repo", request, options);
}
[Fact]
@@ -305,7 +305,7 @@ public void RequestsCorrectUrlWithApiOptionsWithRepositoryId()
client.GetAllForRepository(1, request, options);
- gitHubClient.Received().PullRequest.Comment.GetAllForRepository(1, request, options);
+ gitHubClient.Received().PullRequest.ReviewComment.GetAllForRepository(1, request, options);
}
[Fact]
@@ -483,7 +483,7 @@ public void RequestsCorrectUrlWithoutSelectedSortingArguments()
client.GetAllForRepository("fake", "repo");
- gitHubClient.Received().PullRequest.Comment.GetAllForRepository("fake", "repo");
+ gitHubClient.Received().PullRequest.ReviewComment.GetAllForRepository("fake", "repo");
}
[Fact]
@@ -494,7 +494,7 @@ public void RequestsCorrectUrlWithoutSelectedSortingArgumentsWithRepositoryId()
client.GetAllForRepository(1);
- gitHubClient.Received().PullRequest.Comment.GetAllForRepository(1);
+ gitHubClient.Received().PullRequest.ReviewComment.GetAllForRepository(1);
}
[Fact]
@@ -512,7 +512,7 @@ public void RequestsCorrectUrlWithoutSelectedSortingArgumentsWithApiOptions()
client.GetAllForRepository("fake", "repo", options);
- gitHubClient.Received().PullRequest.Comment.GetAllForRepository("fake", "repo", options);
+ gitHubClient.Received().PullRequest.ReviewComment.GetAllForRepository("fake", "repo", options);
}
[Fact]
@@ -530,7 +530,7 @@ public void RequestsCorrectUrlWithoutSelectedSortingArgumentsWithApiOptionsWithR
client.GetAllForRepository(1, options);
- gitHubClient.Received().PullRequest.Comment.GetAllForRepository(1, options);
+ gitHubClient.Received().PullRequest.ReviewComment.GetAllForRepository(1, options);
}
[Fact]
@@ -721,7 +721,7 @@ public void GetsFromClientPullRequestComment()
client.GetComment("owner", "name", 53);
- gitHubClient.PullRequest.Comment.Received().GetComment("owner", "name", 53);
+ gitHubClient.PullRequest.ReviewComment.Received().GetComment("owner", "name", 53);
}
[Fact]
@@ -732,7 +732,7 @@ public void GetsFromClientPullRequestCommentWithRepositoryId()
client.GetComment(1, 53);
- gitHubClient.PullRequest.Comment.Received().GetComment(1, 53);
+ gitHubClient.PullRequest.ReviewComment.Received().GetComment(1, 53);
}
[Fact]
@@ -760,7 +760,7 @@ public void PostsToCorrectUrl()
client.Create("owner", "name", 13, comment);
- gitHubClient.PullRequest.Comment.Received().Create("owner", "name", 13, comment);
+ gitHubClient.PullRequest.ReviewComment.Received().Create("owner", "name", 13, comment);
}
[Fact]
@@ -773,7 +773,7 @@ public void PostsToCorrectUrlWithRepositoryId()
client.Create(1, 13, comment);
- gitHubClient.PullRequest.Comment.Received().Create(1, 13, comment);
+ gitHubClient.PullRequest.ReviewComment.Received().Create(1, 13, comment);
}
[Fact]
@@ -812,7 +812,7 @@ public void PostsToCorrectUrl()
client.CreateReply("owner", "name", 13, comment);
- gitHubClient.PullRequest.Comment.Received().CreateReply("owner", "name", 13, comment);
+ gitHubClient.PullRequest.ReviewComment.Received().CreateReply("owner", "name", 13, comment);
}
[Fact]
@@ -825,7 +825,7 @@ public void PostsToCorrectUrlWithRepositoryId()
client.CreateReply(1, 13, comment);
- gitHubClient.PullRequest.Comment.Received().CreateReply(1, 13, comment);
+ gitHubClient.PullRequest.ReviewComment.Received().CreateReply(1, 13, comment);
}
[Fact]
@@ -862,7 +862,7 @@ public void PostsToCorrectUrl()
client.Edit("owner", "name", 13, comment);
- gitHubClient.PullRequest.Comment.Received().Edit("owner", "name", 13, comment);
+ gitHubClient.PullRequest.ReviewComment.Received().Edit("owner", "name", 13, comment);
}
[Fact]
@@ -875,7 +875,7 @@ public void PostsToCorrectUrlWithRepositoryId()
client.Edit(1, 13, comment);
- gitHubClient.PullRequest.Comment.Received().Edit(1, 13, comment);
+ gitHubClient.PullRequest.ReviewComment.Received().Edit(1, 13, comment);
}
[Fact]
@@ -909,7 +909,7 @@ public void PostsToCorrectUrl()
client.Delete("owner", "name", 13);
- gitHubClient.PullRequest.Comment.Received().Delete("owner", "name", 13);
+ gitHubClient.PullRequest.ReviewComment.Received().Delete("owner", "name", 13);
}
[Fact]
@@ -920,7 +920,7 @@ public void PostsToCorrectUrlWithRepositoryId()
client.Delete(1, 13);
- gitHubClient.PullRequest.Comment.Received().Delete(1, 13);
+ gitHubClient.PullRequest.ReviewComment.Received().Delete(1, 13);
}
[Fact]
diff --git a/Octokit/Clients/IPullRequestsClient.cs b/Octokit/Clients/IPullRequestsClient.cs
index 04b5418b1b..ccb1315856 100644
--- a/Octokit/Clients/IPullRequestsClient.cs
+++ b/Octokit/Clients/IPullRequestsClient.cs
@@ -1,4 +1,5 @@
-using System.Collections.Generic;
+using System;
+using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Threading.Tasks;
@@ -13,10 +14,16 @@ namespace Octokit
public interface IPullRequestsClient
{
///
- /// Client for managing comments.
+ /// Client for managing review comments.
///
+ [Obsolete("Please use IPullRequestsClient.ReviewComment instead. This method will be removed in a future version")]
IPullRequestReviewCommentsClient Comment { get; }
+ ///
+ /// Client for managing review comments.
+ ///
+ IPullRequestReviewCommentsClient ReviewComment { get; }
+
///
/// Get a pull request by number.
///
diff --git a/Octokit/Clients/PullRequestsClient.cs b/Octokit/Clients/PullRequestsClient.cs
index dad64321b6..81ea33ffed 100644
--- a/Octokit/Clients/PullRequestsClient.cs
+++ b/Octokit/Clients/PullRequestsClient.cs
@@ -1,4 +1,5 @@
-using System.Collections.Generic;
+using System;
+using System.Collections.Generic;
using System.Net;
using System.Threading.Tasks;
@@ -14,13 +15,19 @@ public class PullRequestsClient : ApiClient, IPullRequestsClient
{
public PullRequestsClient(IApiConnection apiConnection) : base(apiConnection)
{
- Comment = new PullRequestReviewCommentsClient(apiConnection);
+ ReviewComment = new PullRequestReviewCommentsClient(apiConnection);
}
///
- /// Client for managing comments.
+ /// Client for managing review comments.
///
- public IPullRequestReviewCommentsClient Comment { get; private set; }
+ [Obsolete("Please use PullRequestsClient.ReviewComment instead. This method will be removed in a future version")]
+ public IPullRequestReviewCommentsClient Comment { get { return this.ReviewComment; } }
+
+ ///
+ /// Client for managing review comments.
+ ///
+ public IPullRequestReviewCommentsClient ReviewComment { get; set; }
///
/// Get a pull request by number.