Skip to content

Commit

Permalink
Merge pull request #1044 from M-Zuber/IRepositoriesClient.RepositoryC…
Browse files Browse the repository at this point in the history
…omments_Deplurize

IRepositoriesClient.RepositoryComments -> IRepositoriesClient.Comment
  • Loading branch information
shiftkey committed Dec 23, 2015
2 parents c4ce114 + 18fd10c commit d15f677
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 2 deletions.
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 @@ -29,7 +29,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 @@ -213,8 +216,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 @@ -32,7 +32,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 @@ -386,8 +389,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

0 comments on commit d15f677

Please sign in to comment.