Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IRepositoriesClient.RepositoryComments -> IRepositoriesClient.Comment #1044

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Octokit.Reactive/Clients/IObservableRepositoriesClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,17 @@ public interface IObservableRepositoriesClient
/// <remarks>
/// See the <a href="http://developer.github.com/v3/repos/comments/">Repository Comments API documentation</a> for more information.
/// </remarks>
[Obsolete("Comment information is now available under the Comment property. This will be removed in a future update.")]
IObservableRepositoryCommentsClient RepositoryComments { get; }

/// <summary>
/// Client for GitHub's Repository Comments API.
/// </summary>
/// <remarks>
/// See the <a href="http://developer.github.com/v3/repos/comments/">Repository Comments API documentation</a> for more information.
/// </remarks>
IObservableRepositoryCommentsClient Comment { get; }

/// <summary>
/// A client for GitHub's Repository Hooks API.
/// </summary>
Expand Down
12 changes: 12 additions & 0 deletions Octokit.Reactive/Clients/ObservableRepositoriesClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ public ObservableRepositoriesClient(IGitHubClient client)
Deployment = new ObservableDeploymentsClient(client);
Statistics = new ObservableStatisticsClient(client);
PullRequest = new ObservablePullRequestsClient(client);
#pragma warning disable CS0618 // Type or member is obsolete
RepositoryComments = new ObservableRepositoryCommentsClient(client);
#pragma warning restore CS0618 // Type or member is obsolete
Comment = new ObservableRepositoryCommentsClient(client);
Commits = new ObservableRepositoryCommitsClient(client);
DeployKeys = new ObservableRepositoryDeployKeysClient(client);
Content = new ObservableRepositoryContentsClient(client);
Expand Down Expand Up @@ -210,8 +213,17 @@ public IObservable<Repository> GetAllForOrg(string organization)
/// <remarks>
/// See the <a href="http://developer.github.com/v3/repos/comments/">Repository Comments API documentation</a> for more information.
/// </remarks>
[Obsolete("Comment information is now available under the Comment property. This will be removed in a future update.")]
public IObservableRepositoryCommentsClient RepositoryComments { get; private set; }

/// <summary>
/// Client for GitHub's Repository Comments API.
/// </summary>
/// <remarks>
/// See the <a href="http://developer.github.com/v3/repos/comments/">Repository Comments API documentation</a> for more information.
/// </remarks>
public IObservableRepositoryCommentsClient Comment { get; private set; }

/// <summary>
/// A client for GitHub's Repository Hooks API.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public ObservableRepositoryCommentsClient(IGitHubClient client)
{
Ensure.ArgumentNotNull(client, "client");

_client = client.Repository.RepositoryComments;
_client = client.Repository.Comment;
_connection = client.Connection;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public PullRequestsClientTests()
_github = Helper.GetAuthenticatedClient();

_fixture = _github.Repository.PullRequest;
_repositoryCommentsClient = _github.Repository.RepositoryComments;
_repositoryCommentsClient = _github.Repository.Comment;

_context = _github.CreateRepositoryContext("source-repo").Result;
}
Expand Down
9 changes: 9 additions & 0 deletions Octokit/Clients/IRepositoriesClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,17 @@ public interface IRepositoriesClient
/// <remarks>
/// See the <a href="http://developer.github.com/v3/repos/comments/">Repository Comments API documentation</a> for more information.
/// </remarks>
[System.Obsolete("Comment information is now available under the Comment property. This will be removed in a future update.")]
IRepositoryCommentsClient RepositoryComments { get; }

/// <summary>
/// Client for managing commit comments in a repository.
/// </summary>
/// <remarks>
/// See the <a href="http://developer.github.com/v3/repos/comments/">Repository Comments API documentation</a> for more information.
/// </remarks>
IRepositoryCommentsClient Comment { get; }

/// <summary>
/// Client for managing deploy keys in a repository.
/// </summary>
Expand Down
12 changes: 12 additions & 0 deletions Octokit/Clients/RepositoriesClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ public RepositoriesClient(IApiConnection apiConnection) : base(apiConnection)
Statistics = new StatisticsClient(apiConnection);
Deployment = new DeploymentsClient(apiConnection);
PullRequest = new PullRequestsClient(apiConnection);
#pragma warning disable CS0618 // Type or member is obsolete
RepositoryComments = new RepositoryCommentsClient(apiConnection);
#pragma warning restore CS0618 // Type or member is obsolete
Comment = new RepositoryCommentsClient(apiConnection);
Commits = new RepositoryCommitsClient(apiConnection);
DeployKeys = new RepositoryDeployKeysClient(apiConnection);
Merging = new MergingClient(apiConnection);
Expand Down Expand Up @@ -374,8 +377,17 @@ public Task<IReadOnlyList<Repository>> GetAllForOrg(string organization)
/// <remarks>
/// See the <a href="http://developer.github.com/v3/repos/comments/">Repository Comments API documentation</a> for more information.
/// </remarks>
[Obsolete("Comment information is now available under the Comment property. This will be removed in a future update.")]
public IRepositoryCommentsClient RepositoryComments { get; private set; }

/// <summary>
/// Client for managing commit comments in a repository.
/// </summary>
/// <remarks>
/// See the <a href="http://developer.github.com/v3/repos/comments/">Repository Comments API documentation</a> for more information.
/// </remarks>
public IRepositoryCommentsClient Comment { get; private set; }

/// <summary>
/// Client for managing deploy keys in a repository.
/// </summary>
Expand Down