Skip to content

Commit

Permalink
Remove method/members previously deprecated (#1780)
Browse files Browse the repository at this point in the history
* removes obsolete OranizationsClient.GetAll (replaced with GetAllForUser)

* removes obsolete PullRequestsClient.Comment (replaced with ReviewComment)

* removes obsolete TeamsClient.GetMembership (replaced with GetMembershipDetails)
removes obsolete TeamsClient.AddMembership (replaced with AddOrEditMembership)
removes obsolete TeamsClient.AddMembership (replaced with AddOrEditMembership)
removes obsolete TeamMembership response class (replaced with TeamMembershipDetails)

* removes obsolete RepositoryBranchesClient.GetRequiredStatusChecksContexts (replaced with GetAllRequiredStatusChecksContexts)
removes obsolete RepositoryBranchesClient.GetProtectedBranchTeamRestrictions (replaced with GetAllProtectedBranchTeamRestrictions)
removes obsolete RepositoryBranchesClient.GetProtectedBranchUserRestrictions (replaced with GetAllProtectedBranchUserRestrictions)

* removes obsolete RepositoryTrafficClient.GetReferrers (replaced with GetAllReferrers)
removes obsolete RepositoryTrafficClient.GetPaths (replaced with GetAllPaths)

* removes obsolete constructors from BranchProtectionUpdateSettings and UpdateTeam request models

* removes obsolete Assignee property from NewIssue and IssueUpdate request models (replaced with Assignees)
  • Loading branch information
ryangribble authored Apr 21, 2018
1 parent 73c36b7 commit 600c865
Show file tree
Hide file tree
Showing 32 changed files with 15 additions and 976 deletions.
17 changes: 0 additions & 17 deletions Octokit.Reactive/Clients/IObservableOrganizationsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,23 +46,6 @@ public interface IObservableOrganizationsClient
Justification = "Method makes a network request")]
IObservable<Organization> GetAllForCurrent(ApiOptions options);

/// <summary>
/// Returns all the organizations for the specified user
/// </summary>
/// <param name="user">The login for the user</param>
/// <returns></returns>
[Obsolete("Please use IObservableOrganizationsClient.GetAllForUser() instead. This method will be removed in a future version")]
IObservable<Organization> GetAll(string user);

/// <summary>
/// Returns all the organizations for the specified user
/// </summary>
/// <param name="user">The login for the user</param>
/// <param name="options">Options for changing the API response</param>
/// <returns></returns>
[Obsolete("Please use IObservableOrganizationsClient.GetAllForUser() instead. This method will be removed in a future version")]
IObservable<Organization> GetAll(string user, ApiOptions options);

/// <summary>
/// Returns all the organizations for the specified user
/// </summary>
Expand Down
6 changes: 0 additions & 6 deletions Octokit.Reactive/Clients/IObservablePullRequestsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ namespace Octokit.Reactive
/// </remarks>
public interface IObservablePullRequestsClient
{
/// <summary>
/// Client for managing review comments.
/// </summary>
[Obsolete("Please use IObservablePullRequestsClient.ReviewComment. This will be removed in a future version")]
IObservablePullRequestReviewCommentsClient Comment { get; }

/// <summary>
/// Client for managing reviews.
/// </summary>
Expand Down
69 changes: 0 additions & 69 deletions Octokit.Reactive/Clients/IObservableRepositoryBranchesClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -205,29 +205,6 @@ public interface IObservableRepositoryBranchesClient
/// <param name="branch">The name of the branch</param>
IObservable<bool> DeleteRequiredStatusChecks(long repositoryId, string branch);

/// <summary>
/// Get the required status checks contexts for the specified branch
/// </summary>
/// <remarks>
/// See the <a href="https://developer.github.com/v3/repos/branches/#list-required-status-checks-contexts-of-protected-branch">API documentation</a> for more details
/// </remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="branch">The name of the branch</param>
[Obsolete("Please use GetAllRequiredStatusChecksContexts instead")]
IObservable<string> GetRequiredStatusChecksContexts(string owner, string name, string branch);

/// <summary>
/// Get the required status checks contexts for the specified branch
/// </summary>
/// <remarks>
/// See the <a href="https://developer.github.com/v3/repos/branches/#list-required-status-checks-contexts-of-protected-branch">API documentation</a> for more details
/// </remarks>
/// <param name="repositoryId">The Id of the repository</param>
/// <param name="branch">The name of the branch</param>
[Obsolete("Please use GetAllRequiredStatusChecksContexts instead")]
IObservable<string> GetRequiredStatusChecksContexts(long repositoryId, string branch);

/// <summary>
/// Get the required status checks contexts for the specified branch
/// </summary>
Expand Down Expand Up @@ -488,29 +465,6 @@ public interface IObservableRepositoryBranchesClient
/// <param name="branch">The name of the branch</param>
IObservable<bool> DeleteProtectedBranchRestrictions(long repositoryId, string branch);

/// <summary>
/// Get team restrictions for the specified branch (applies only to Organization owned repositories)
/// </summary>
/// <remarks>
/// See the <a href="https://developer.github.com/v3/repos/branches/#list-team-restrictions-of-protected-branch">API documentation</a> for more details
/// </remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="branch">The name of the branch</param>
[Obsolete("Please use GetAllProtectedBranchTeamRestrictions instead")]
IObservable<Team> GetProtectedBranchTeamRestrictions(string owner, string name, string branch);

/// <summary>
/// Get team restrictions for the specified branch (applies only to Organization owned repositories)
/// </summary>
/// <remarks>
/// See the <a href="https://developer.github.com/v3/repos/branches/#list-team-restrictions-of-protected-branch">API documentation</a> for more details
/// </remarks>
/// <param name="repositoryId">The Id of the repository</param>
/// <param name="branch">The name of the branch</param>
[Obsolete("Please use GetAllProtectedBranchTeamRestrictions instead")]
IObservable<Team> GetProtectedBranchTeamRestrictions(long repositoryId, string branch);

/// <summary>
/// Get team restrictions for the specified branch (applies only to Organization owned repositories)
/// </summary>
Expand Down Expand Up @@ -601,29 +555,6 @@ public interface IObservableRepositoryBranchesClient
/// <param name="teams">List of teams to remove</param>
IObservable<Team> DeleteProtectedBranchTeamRestrictions(long repositoryId, string branch, BranchProtectionTeamCollection teams);

/// <summary>
/// Get user restrictions for the specified branch (applies only to Organization owned repositories)
/// </summary>
/// <remarks>
/// See the <a href="https://developer.github.com/v3/repos/branches/#list-user-restrictions-of-protected-branch">API documentation</a> for more details
/// </remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="branch">The name of the branch</param>
[Obsolete("Please use GetAllProtectedBranchUserRestrictions instead")]
IObservable<User> GetProtectedBranchUserRestrictions(string owner, string name, string branch);

/// <summary>
/// Get user restrictions for the specified branch (applies only to Organization owned repositories)
/// </summary>
/// <remarks>
/// See the <a href="https://developer.github.com/v3/repos/branches/#list-user-restrictions-of-protected-branch">API documentation</a> for more details
/// </remarks>
/// <param name="repositoryId">The Id of the repository</param>
/// <param name="branch">The name of the branch</param>
[Obsolete("Please use GetAllProtectedBranchUserRestrictions instead")]
IObservable<User> GetProtectedBranchUserRestrictions(long repositoryId, string branch);

/// <summary>
/// Get user restrictions for the specified branch (applies only to Organization owned repositories)
/// </summary>
Expand Down
34 changes: 0 additions & 34 deletions Octokit.Reactive/Clients/IObservableRepositoryTrafficClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,6 @@ namespace Octokit.Reactive
/// </remarks>
public interface IObservableRepositoryTrafficClient
{
/// <summary>
/// List the top 10 referrers over the last 14 days
/// </summary>
/// <remarks>https://developer.github.com/v3/repos/traffic/#list-referrers</remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
[Obsolete("Please use GetAllReferrers instead")]
IObservable<RepositoryTrafficReferrer> GetReferrers(string owner, string name);

/// <summary>
/// List the top 10 referrers over the last 14 days
/// </summary>
/// <remarks>https://developer.github.com/v3/repos/traffic/#list-referrers</remarks>
/// <param name="repositoryId">The owner of the repository</param>
[Obsolete("Please use GetAllReferrers instead")]
IObservable<RepositoryTrafficReferrer> GetReferrers(long repositoryId);

/// <summary>
/// List the top 10 referrers over the last 14 days
/// </summary>
Expand All @@ -42,23 +25,6 @@ public interface IObservableRepositoryTrafficClient
/// <param name="repositoryId">The owner of the repository</param>
IObservable<RepositoryTrafficReferrer> GetAllReferrers(long repositoryId);

/// <summary>
/// List the top 10 popular contents over the last 14 days
/// </summary>
/// <remarks>https://developer.github.com/v3/repos/traffic/#list-paths</remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
[Obsolete("Please use GetAllPaths instead")]
IObservable<RepositoryTrafficPath> GetPaths(string owner, string name);

/// <summary>
/// List the top 10 popular contents over the last 14 days
/// </summary>
/// <remarks>https://developer.github.com/v3/repos/traffic/#list-paths</remarks>
/// <param name="repositoryId">The owner of the repository</param>
[Obsolete("Please use GetAllPaths instead")]
IObservable<RepositoryTrafficPath> GetPaths(long repositoryId);

/// <summary>
/// List the top 10 popular contents over the last 14 days
/// </summary>
Expand Down
20 changes: 0 additions & 20 deletions Octokit.Reactive/Clients/IObservableTeamsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,17 +138,6 @@ public interface IObservableTeamsClient
/// <returns></returns>
IObservable<Unit> Delete(int id);

/// <summary>
/// Adds a <see cref="User"/> to a <see cref="Team"/>.
/// </summary>
/// <remarks>
/// See the <a href="https://developer.github.com/v3/orgs/teams/#add-or-update-team-membership">API documentation</a> for more information.
/// </remarks>
/// <param name="id">The team identifier.</param>
/// <param name="login">The user to add to the team.</param>
[Obsolete("Please use AddOrEditMembership instead")]
IObservable<TeamMembership> AddMembership(int id, string login);

/// <summary>
/// Adds a <see cref="User"/> to a <see cref="Team"/>.
/// </summary>
Expand All @@ -171,15 +160,6 @@ public interface IObservableTeamsClient
/// <returns><see langword="true"/> if the user was removed from the team; <see langword="false"/> otherwise.</returns>
IObservable<bool> RemoveMembership(int id, string login);

/// <summary>
/// Gets whether the user with the given <paramref name="login"/>
/// is a member of the team with the given <paramref name="id"/>.
/// </summary>
/// <param name="id">The team to check.</param>
/// <param name="login">The user to check.</param>
[Obsolete("Please use GetMembershipDetails instead")]
IObservable<TeamMembership> GetMembership(int id, string login);

/// <summary>
/// Gets whether the user with the given <paramref name="login"/>
/// is a member of the team with the given <paramref name="id"/>.
Expand Down
28 changes: 0 additions & 28 deletions Octokit.Reactive/Clients/ObservableOrganizationsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,34 +73,6 @@ public IObservable<Organization> GetAllForCurrent(ApiOptions options)
return _connection.GetAndFlattenAllPages<Organization>(ApiUrls.UserOrganizations());
}

/// <summary>
/// Returns all the organizations for the specified user
/// </summary>
/// <param name="user">The login for the user</param>
/// <returns></returns>
[Obsolete("Please use ObservableOrganizationsClient.GetAllForUser() instead. This method will be removed in a future version")]
public IObservable<Organization> GetAll(string user)
{
Ensure.ArgumentNotNullOrEmptyString(user, nameof(user));

return _connection.GetAndFlattenAllPages<Organization>(ApiUrls.UserOrganizations(user));
}

/// <summary>
/// Returns all the organizations for the specified user
/// </summary>
/// <param name="user">The login for the user</param>
/// <param name="options">Options for changing the API response</param>
/// <returns></returns>
[Obsolete("Please use ObservableOrganizationsClient.GetAllForUser() instead. This method will be removed in a future version")]
public IObservable<Organization> GetAll(string user, ApiOptions options)
{
Ensure.ArgumentNotNullOrEmptyString(user, nameof(user));
Ensure.ArgumentNotNull(options, nameof(options));

return _connection.GetAndFlattenAllPages<Organization>(ApiUrls.UserOrganizations(user), options);
}

/// <summary>
/// Returns all the organizations for the specified user
/// </summary>
Expand Down
6 changes: 0 additions & 6 deletions Octokit.Reactive/Clients/ObservablePullRequestsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@ public class ObservablePullRequestsClient : IObservablePullRequestsClient
readonly IPullRequestsClient _client;
readonly IConnection _connection;

/// <summary>
/// Client for managing review comments.
/// </summary>
[Obsolete("Please use ObservablePullRequestsClient.ReviewComment. This will be removed in a future version")]
public IObservablePullRequestReviewCommentsClient Comment { get { return this.ReviewComment; } }

/// <summary>
/// Client for managing reviews.
/// </summary>
Expand Down
88 changes: 0 additions & 88 deletions Octokit.Reactive/Clients/ObservableRepositoryBranchesClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -322,35 +322,6 @@ public IObservable<bool> DeleteRequiredStatusChecks(long repositoryId, string br
return _client.DeleteRequiredStatusChecks(repositoryId, branch).ToObservable();
}

/// <summary>
/// Get the required status checks contexts for the specified branch
/// </summary>
/// <remarks>
/// See the <a href="https://developer.github.com/v3/repos/branches/#list-required-status-checks-contexts-of-protected-branch">API documentation</a> for more details
/// </remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="branch">The name of the branch</param>
[Obsolete("Please use GetAllRequiredStatusChecksContexts instead")]
public IObservable<string> GetRequiredStatusChecksContexts(string owner, string name, string branch)
{
return GetAllRequiredStatusChecksContexts(owner, name, branch);
}

/// <summary>
/// Get the required status checks contexts for the specified branch
/// </summary>
/// <remarks>
/// See the <a href="https://developer.github.com/v3/repos/branches/#list-required-status-checks-contexts-of-protected-branch">API documentation</a> for more details
/// </remarks>
/// <param name="repositoryId">The Id of the repository</param>
/// <param name="branch">The name of the branch</param>
[Obsolete("Please use GetAllRequiredStatusChecksContexts instead")]
public IObservable<string> GetRequiredStatusChecksContexts(long repositoryId, string branch)
{
return GetAllRequiredStatusChecksContexts(repositoryId, branch);
}

/// <summary>
/// Get the required status checks contexts for the specified branch
/// </summary>
Expand Down Expand Up @@ -763,35 +734,6 @@ public IObservable<bool> DeleteProtectedBranchRestrictions(long repositoryId, st
return _client.DeleteProtectedBranchRestrictions(repositoryId, branch).ToObservable();
}

/// <summary>
/// Get team restrictions for the specified branch (applies only to Organization owned repositories)
/// </summary>
/// <remarks>
/// See the <a href="https://developer.github.com/v3/repos/branches/#list-team-restrictions-of-protected-branch">API documentation</a> for more details
/// </remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="branch">The name of the branch</param>
[Obsolete("Please use GetAllProtectedBranchTeamRestrictions instead")]
public IObservable<Team> GetProtectedBranchTeamRestrictions(string owner, string name, string branch)
{
return GetAllProtectedBranchTeamRestrictions(owner, name, branch);
}

/// <summary>
/// Get team restrictions for the specified branch (applies only to Organization owned repositories)
/// </summary>
/// <remarks>
/// See the <a href="https://developer.github.com/v3/repos/branches/#list-team-restrictions-of-protected-branch">API documentation</a> for more details
/// </remarks>
/// <param name="repositoryId">The Id of the repository</param>
/// <param name="branch">The name of the branch</param>
[Obsolete("Please use GetAllProtectedBranchTeamRestrictions instead")]
public IObservable<Team> GetProtectedBranchTeamRestrictions(long repositoryId, string branch)
{
return GetAllProtectedBranchTeamRestrictions(repositoryId, branch);
}

/// <summary>
/// Get team restrictions for the specified branch (applies only to Organization owned repositories)
/// </summary>
Expand Down Expand Up @@ -936,36 +878,6 @@ public IObservable<Team> DeleteProtectedBranchTeamRestrictions(long repositoryId
return _client.DeleteProtectedBranchTeamRestrictions(repositoryId, branch, teams).ToObservable().SelectMany(x => x);
}

/// <summary>
/// Get user restrictions for the specified branch (applies only to Organization owned repositories)
/// </summary>
/// <remarks>
/// See the <a href="https://developer.github.com/v3/repos/branches/#list-user-restrictions-of-protected-branch">API documentation</a> for more details
/// </remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="branch">The name of the branch</param>
[Obsolete("Please use GetAllProtectedBranchUserRestrictions instead")]
public IObservable<User> GetProtectedBranchUserRestrictions(string owner, string name, string branch)
{
return GetAllProtectedBranchUserRestrictions(owner, name, branch);
}

/// <summary>
/// Get user restrictions for the specified branch (applies only to Organization owned repositories)
/// </summary>
/// <remarks>
/// See the <a href="https://developer.github.com/v3/repos/branches/#list-user-restrictions-of-protected-branch">API documentation</a> for more details
/// </remarks>
/// <param name="repositoryId">The Id of the repository</param>
/// <param name="branch">The name of the branch</param>
[Obsolete("Please use GetAllProtectedBranchUserRestrictions instead")]

public IObservable<User> GetProtectedBranchUserRestrictions(long repositoryId, string branch)
{
return GetAllProtectedBranchUserRestrictions(repositoryId, branch);
}

/// <summary>
/// Get user restrictions for the specified branch (applies only to Organization owned repositories)
/// </summary>
Expand Down
Loading

0 comments on commit 600c865

Please sign in to comment.