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.RepoCollaborators -> IRepositoriesClient.Collaborator #1040

Merged
merged 1 commit into from
Dec 23, 2015
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 @@ -276,8 +276,17 @@ public interface IObservableRepositoriesClient
/// <remarks>
/// See the <a href="http://developer.github.com/v3/repos/collaborators/">Collaborators API documentation</a> for more details
/// </remarks>
[Obsolete("Collaborator information is now available under the Collaborator property. This will be removed in a future update.")]
IObservableRepoCollaboratorsClient RepoCollaborators { get; }

/// <summary>
/// A client for GitHub's Repo Collaborators.
/// </summary>
/// <remarks>
/// See the <a href="http://developer.github.com/v3/repos/collaborators/">Collaborators API documentation</a> for more details
/// </remarks>
IObservableRepoCollaboratorsClient Collaborator { get; }

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

_client = client.Repository.RepoCollaborators;
_client = client.Repository.Collaborator;
_connection = client.Connection;
}

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 @@ -22,7 +22,10 @@ public ObservableRepositoriesClient(IGitHubClient client)
CommitStatus = new ObservableCommitStatusClient(client);
Hooks = new ObservableRepositoryHooksClient(client);
Forks = new ObservableRepositoryForksClient(client);
#pragma warning disable CS0618 // Type or member is obsolete
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This ensures that current consumers won't get null

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

RepoCollaborators = new ObservableRepoCollaboratorsClient(client);
#pragma warning restore CS0618 // Type or member is obsolete
Collaborator = new ObservableRepoCollaboratorsClient(client);
Deployment = new ObservableDeploymentsClient(client);
Statistics = new ObservableStatisticsClient(client);
PullRequest = new ObservablePullRequestsClient(client);
Expand Down Expand Up @@ -412,8 +415,17 @@ public IObservable<CompareResult> Compare(string owner, string name, string @bas
/// <remarks>
/// See the <a href="http://developer.github.com/v3/repos/collaborators/">Collaborators API documentation</a> for more details
/// </remarks>
[Obsolete("Collaborator information is now available under the Collaborator property. This will be removed in a future update.")]
public IObservableRepoCollaboratorsClient RepoCollaborators { get; private set; }

/// <summary>
/// A client for GitHub's Repo Collaborators.
/// </summary>
/// <remarks>
/// See the <a href="http://developer.github.com/v3/repos/collaborators/">Collaborators API documentation</a> for more details
/// </remarks>
public IObservableRepoCollaboratorsClient Collaborator { get; private set; }

/// <summary>
/// Client for GitHub's Repository Commits API
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion Octokit.Reactive/Octokit.Reactive.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -201,4 +201,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>
9 changes: 9 additions & 0 deletions Octokit/Clients/IRepositoriesClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,17 @@ public interface IRepositoriesClient
/// <remarks>
/// See the <a href="http://developer.github.com/v3/repos/collaborators/">Collaborators API documentation</a> for more details
/// </remarks>
[System.Obsolete("Collaborator information is now available under the Collaborator property. This will be removed in a future update.")]
IRepoCollaboratorsClient RepoCollaborators { get; }

/// <summary>
/// A client for GitHub's Repo Collaborators.
/// </summary>
/// <remarks>
/// See the <a href="http://developer.github.com/v3/repos/collaborators/">Collaborators API documentation</a> for more details
/// </remarks>
IRepoCollaboratorsClient Collaborator { get; }

/// <summary>
/// Client for GitHub's Repository Deployments API
/// </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 @@ -25,7 +25,10 @@ public RepositoriesClient(IApiConnection apiConnection) : base(apiConnection)
CommitStatus = new CommitStatusClient(apiConnection);
Hooks = new RepositoryHooksClient(apiConnection);
Forks = new RepositoryForksClient(apiConnection);
#pragma warning disable CS0618 // Type or member is obsolete
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above

RepoCollaborators = new RepoCollaboratorsClient(apiConnection);
#pragma warning restore CS0618 // Type or member is obsolete
Collaborator = new RepoCollaboratorsClient(apiConnection);
Statistics = new StatisticsClient(apiConnection);
Deployment = new DeploymentsClient(apiConnection);
PullRequest = new PullRequestsClient(apiConnection);
Expand Down Expand Up @@ -326,8 +329,17 @@ public Task<IReadOnlyList<Repository>> GetAllForOrg(string organization)
/// <remarks>
/// See the <a href="http://developer.github.com/v3/repos/collaborators/">Collaborators API documentation</a> for more details
/// </remarks>
[System.Obsolete("Collaborator information is now available under the Collaborator property. This will be removed in a future update.")]
public IRepoCollaboratorsClient RepoCollaborators { get; private set; }

/// <summary>
/// A client for GitHub's Repo Collaborators.
/// </summary>
/// <remarks>
/// See the <a href="http://developer.github.com/v3/repos/collaborators/">Collaborators API documentation</a> for more details
/// </remarks>
public IRepoCollaboratorsClient Collaborator { get; private set; }

/// <summary>
/// Client for GitHub's Repository Deployments API
/// </summary>
Expand Down