diff --git a/Octokit.Reactive/Clients/IObservableOrganizationsClient.cs b/Octokit.Reactive/Clients/IObservableOrganizationsClient.cs index d436213ae9..cda5a4727d 100644 --- a/Octokit.Reactive/Clients/IObservableOrganizationsClient.cs +++ b/Octokit.Reactive/Clients/IObservableOrganizationsClient.cs @@ -46,23 +46,6 @@ public interface IObservableOrganizationsClient Justification = "Method makes a network request")] IObservable GetAllForCurrent(ApiOptions options); - /// - /// Returns all the organizations for the specified user - /// - /// The login for the user - /// - [Obsolete("Please use IObservableOrganizationsClient.GetAllForUser() instead. This method will be removed in a future version")] - IObservable GetAll(string user); - - /// - /// Returns all the organizations for the specified user - /// - /// The login for the user - /// Options for changing the API response - /// - [Obsolete("Please use IObservableOrganizationsClient.GetAllForUser() instead. This method will be removed in a future version")] - IObservable GetAll(string user, ApiOptions options); - /// /// Returns all the organizations for the specified user /// diff --git a/Octokit.Reactive/Clients/IObservablePullRequestsClient.cs b/Octokit.Reactive/Clients/IObservablePullRequestsClient.cs index 73dadb39e7..007886afcf 100644 --- a/Octokit.Reactive/Clients/IObservablePullRequestsClient.cs +++ b/Octokit.Reactive/Clients/IObservablePullRequestsClient.cs @@ -11,12 +11,6 @@ namespace Octokit.Reactive /// public interface IObservablePullRequestsClient { - /// - /// Client for managing review comments. - /// - [Obsolete("Please use IObservablePullRequestsClient.ReviewComment. This will be removed in a future version")] - IObservablePullRequestReviewCommentsClient Comment { get; } - /// /// Client for managing reviews. /// diff --git a/Octokit.Reactive/Clients/IObservableRepositoryBranchesClient.cs b/Octokit.Reactive/Clients/IObservableRepositoryBranchesClient.cs index baa74d9ce5..eb9e41c26d 100644 --- a/Octokit.Reactive/Clients/IObservableRepositoryBranchesClient.cs +++ b/Octokit.Reactive/Clients/IObservableRepositoryBranchesClient.cs @@ -205,29 +205,6 @@ public interface IObservableRepositoryBranchesClient /// The name of the branch IObservable DeleteRequiredStatusChecks(long repositoryId, string branch); - /// - /// Get the required status checks contexts for the specified branch - /// - /// - /// See the API documentation for more details - /// - /// The owner of the repository - /// The name of the repository - /// The name of the branch - [Obsolete("Please use GetAllRequiredStatusChecksContexts instead")] - IObservable GetRequiredStatusChecksContexts(string owner, string name, string branch); - - /// - /// Get the required status checks contexts for the specified branch - /// - /// - /// See the API documentation for more details - /// - /// The Id of the repository - /// The name of the branch - [Obsolete("Please use GetAllRequiredStatusChecksContexts instead")] - IObservable GetRequiredStatusChecksContexts(long repositoryId, string branch); - /// /// Get the required status checks contexts for the specified branch /// @@ -488,29 +465,6 @@ public interface IObservableRepositoryBranchesClient /// The name of the branch IObservable DeleteProtectedBranchRestrictions(long repositoryId, string branch); - /// - /// Get team restrictions for the specified branch (applies only to Organization owned repositories) - /// - /// - /// See the API documentation for more details - /// - /// The owner of the repository - /// The name of the repository - /// The name of the branch - [Obsolete("Please use GetAllProtectedBranchTeamRestrictions instead")] - IObservable GetProtectedBranchTeamRestrictions(string owner, string name, string branch); - - /// - /// Get team restrictions for the specified branch (applies only to Organization owned repositories) - /// - /// - /// See the API documentation for more details - /// - /// The Id of the repository - /// The name of the branch - [Obsolete("Please use GetAllProtectedBranchTeamRestrictions instead")] - IObservable GetProtectedBranchTeamRestrictions(long repositoryId, string branch); - /// /// Get team restrictions for the specified branch (applies only to Organization owned repositories) /// @@ -601,29 +555,6 @@ public interface IObservableRepositoryBranchesClient /// List of teams to remove IObservable DeleteProtectedBranchTeamRestrictions(long repositoryId, string branch, BranchProtectionTeamCollection teams); - /// - /// Get user restrictions for the specified branch (applies only to Organization owned repositories) - /// - /// - /// See the API documentation for more details - /// - /// The owner of the repository - /// The name of the repository - /// The name of the branch - [Obsolete("Please use GetAllProtectedBranchUserRestrictions instead")] - IObservable GetProtectedBranchUserRestrictions(string owner, string name, string branch); - - /// - /// Get user restrictions for the specified branch (applies only to Organization owned repositories) - /// - /// - /// See the API documentation for more details - /// - /// The Id of the repository - /// The name of the branch - [Obsolete("Please use GetAllProtectedBranchUserRestrictions instead")] - IObservable GetProtectedBranchUserRestrictions(long repositoryId, string branch); - /// /// Get user restrictions for the specified branch (applies only to Organization owned repositories) /// diff --git a/Octokit.Reactive/Clients/IObservableRepositoryTrafficClient.cs b/Octokit.Reactive/Clients/IObservableRepositoryTrafficClient.cs index 5d027e1396..9592e9921d 100644 --- a/Octokit.Reactive/Clients/IObservableRepositoryTrafficClient.cs +++ b/Octokit.Reactive/Clients/IObservableRepositoryTrafficClient.cs @@ -10,23 +10,6 @@ namespace Octokit.Reactive /// public interface IObservableRepositoryTrafficClient { - /// - /// List the top 10 referrers over the last 14 days - /// - /// https://developer.github.com/v3/repos/traffic/#list-referrers - /// The owner of the repository - /// The name of the repository - [Obsolete("Please use GetAllReferrers instead")] - IObservable GetReferrers(string owner, string name); - - /// - /// List the top 10 referrers over the last 14 days - /// - /// https://developer.github.com/v3/repos/traffic/#list-referrers - /// The owner of the repository - [Obsolete("Please use GetAllReferrers instead")] - IObservable GetReferrers(long repositoryId); - /// /// List the top 10 referrers over the last 14 days /// @@ -42,23 +25,6 @@ public interface IObservableRepositoryTrafficClient /// The owner of the repository IObservable GetAllReferrers(long repositoryId); - /// - /// List the top 10 popular contents over the last 14 days - /// - /// https://developer.github.com/v3/repos/traffic/#list-paths - /// The owner of the repository - /// The name of the repository - [Obsolete("Please use GetAllPaths instead")] - IObservable GetPaths(string owner, string name); - - /// - /// List the top 10 popular contents over the last 14 days - /// - /// https://developer.github.com/v3/repos/traffic/#list-paths - /// The owner of the repository - [Obsolete("Please use GetAllPaths instead")] - IObservable GetPaths(long repositoryId); - /// /// List the top 10 popular contents over the last 14 days /// diff --git a/Octokit.Reactive/Clients/IObservableTeamsClient.cs b/Octokit.Reactive/Clients/IObservableTeamsClient.cs index 0e992e697e..95d382a9bd 100644 --- a/Octokit.Reactive/Clients/IObservableTeamsClient.cs +++ b/Octokit.Reactive/Clients/IObservableTeamsClient.cs @@ -138,17 +138,6 @@ public interface IObservableTeamsClient /// IObservable Delete(int id); - /// - /// Adds a to a . - /// - /// - /// See the API documentation for more information. - /// - /// The team identifier. - /// The user to add to the team. - [Obsolete("Please use AddOrEditMembership instead")] - IObservable AddMembership(int id, string login); - /// /// Adds a to a . /// @@ -171,15 +160,6 @@ public interface IObservableTeamsClient /// if the user was removed from the team; otherwise. IObservable RemoveMembership(int id, string login); - /// - /// Gets whether the user with the given - /// is a member of the team with the given . - /// - /// The team to check. - /// The user to check. - [Obsolete("Please use GetMembershipDetails instead")] - IObservable GetMembership(int id, string login); - /// /// Gets whether the user with the given /// is a member of the team with the given . diff --git a/Octokit.Reactive/Clients/ObservableOrganizationsClient.cs b/Octokit.Reactive/Clients/ObservableOrganizationsClient.cs index 035bcb76dc..690375eb2b 100644 --- a/Octokit.Reactive/Clients/ObservableOrganizationsClient.cs +++ b/Octokit.Reactive/Clients/ObservableOrganizationsClient.cs @@ -73,34 +73,6 @@ public IObservable GetAllForCurrent(ApiOptions options) return _connection.GetAndFlattenAllPages(ApiUrls.UserOrganizations()); } - /// - /// Returns all the organizations for the specified user - /// - /// The login for the user - /// - [Obsolete("Please use ObservableOrganizationsClient.GetAllForUser() instead. This method will be removed in a future version")] - public IObservable GetAll(string user) - { - Ensure.ArgumentNotNullOrEmptyString(user, nameof(user)); - - return _connection.GetAndFlattenAllPages(ApiUrls.UserOrganizations(user)); - } - - /// - /// Returns all the organizations for the specified user - /// - /// The login for the user - /// Options for changing the API response - /// - [Obsolete("Please use ObservableOrganizationsClient.GetAllForUser() instead. This method will be removed in a future version")] - public IObservable GetAll(string user, ApiOptions options) - { - Ensure.ArgumentNotNullOrEmptyString(user, nameof(user)); - Ensure.ArgumentNotNull(options, nameof(options)); - - return _connection.GetAndFlattenAllPages(ApiUrls.UserOrganizations(user), options); - } - /// /// Returns all the organizations for the specified user /// diff --git a/Octokit.Reactive/Clients/ObservablePullRequestsClient.cs b/Octokit.Reactive/Clients/ObservablePullRequestsClient.cs index 2aefae050e..e6b77d3fae 100644 --- a/Octokit.Reactive/Clients/ObservablePullRequestsClient.cs +++ b/Octokit.Reactive/Clients/ObservablePullRequestsClient.cs @@ -15,12 +15,6 @@ public class ObservablePullRequestsClient : IObservablePullRequestsClient readonly IPullRequestsClient _client; readonly IConnection _connection; - /// - /// Client for managing review comments. - /// - [Obsolete("Please use ObservablePullRequestsClient.ReviewComment. This will be removed in a future version")] - public IObservablePullRequestReviewCommentsClient Comment { get { return this.ReviewComment; } } - /// /// Client for managing reviews. /// diff --git a/Octokit.Reactive/Clients/ObservableRepositoryBranchesClient.cs b/Octokit.Reactive/Clients/ObservableRepositoryBranchesClient.cs index 55a3230a12..ac87bb1b0d 100644 --- a/Octokit.Reactive/Clients/ObservableRepositoryBranchesClient.cs +++ b/Octokit.Reactive/Clients/ObservableRepositoryBranchesClient.cs @@ -322,35 +322,6 @@ public IObservable DeleteRequiredStatusChecks(long repositoryId, string br return _client.DeleteRequiredStatusChecks(repositoryId, branch).ToObservable(); } - /// - /// Get the required status checks contexts for the specified branch - /// - /// - /// See the API documentation for more details - /// - /// The owner of the repository - /// The name of the repository - /// The name of the branch - [Obsolete("Please use GetAllRequiredStatusChecksContexts instead")] - public IObservable GetRequiredStatusChecksContexts(string owner, string name, string branch) - { - return GetAllRequiredStatusChecksContexts(owner, name, branch); - } - - /// - /// Get the required status checks contexts for the specified branch - /// - /// - /// See the API documentation for more details - /// - /// The Id of the repository - /// The name of the branch - [Obsolete("Please use GetAllRequiredStatusChecksContexts instead")] - public IObservable GetRequiredStatusChecksContexts(long repositoryId, string branch) - { - return GetAllRequiredStatusChecksContexts(repositoryId, branch); - } - /// /// Get the required status checks contexts for the specified branch /// @@ -763,35 +734,6 @@ public IObservable DeleteProtectedBranchRestrictions(long repositoryId, st return _client.DeleteProtectedBranchRestrictions(repositoryId, branch).ToObservable(); } - /// - /// Get team restrictions for the specified branch (applies only to Organization owned repositories) - /// - /// - /// See the API documentation for more details - /// - /// The owner of the repository - /// The name of the repository - /// The name of the branch - [Obsolete("Please use GetAllProtectedBranchTeamRestrictions instead")] - public IObservable GetProtectedBranchTeamRestrictions(string owner, string name, string branch) - { - return GetAllProtectedBranchTeamRestrictions(owner, name, branch); - } - - /// - /// Get team restrictions for the specified branch (applies only to Organization owned repositories) - /// - /// - /// See the API documentation for more details - /// - /// The Id of the repository - /// The name of the branch - [Obsolete("Please use GetAllProtectedBranchTeamRestrictions instead")] - public IObservable GetProtectedBranchTeamRestrictions(long repositoryId, string branch) - { - return GetAllProtectedBranchTeamRestrictions(repositoryId, branch); - } - /// /// Get team restrictions for the specified branch (applies only to Organization owned repositories) /// @@ -936,36 +878,6 @@ public IObservable DeleteProtectedBranchTeamRestrictions(long repositoryId return _client.DeleteProtectedBranchTeamRestrictions(repositoryId, branch, teams).ToObservable().SelectMany(x => x); } - /// - /// Get user restrictions for the specified branch (applies only to Organization owned repositories) - /// - /// - /// See the API documentation for more details - /// - /// The owner of the repository - /// The name of the repository - /// The name of the branch - [Obsolete("Please use GetAllProtectedBranchUserRestrictions instead")] - public IObservable GetProtectedBranchUserRestrictions(string owner, string name, string branch) - { - return GetAllProtectedBranchUserRestrictions(owner, name, branch); - } - - /// - /// Get user restrictions for the specified branch (applies only to Organization owned repositories) - /// - /// - /// See the API documentation for more details - /// - /// The Id of the repository - /// The name of the branch - [Obsolete("Please use GetAllProtectedBranchUserRestrictions instead")] - - public IObservable GetProtectedBranchUserRestrictions(long repositoryId, string branch) - { - return GetAllProtectedBranchUserRestrictions(repositoryId, branch); - } - /// /// Get user restrictions for the specified branch (applies only to Organization owned repositories) /// diff --git a/Octokit.Reactive/Clients/ObservableRepositoryTrafficClient.cs b/Octokit.Reactive/Clients/ObservableRepositoryTrafficClient.cs index d714b88665..1aef386f5c 100644 --- a/Octokit.Reactive/Clients/ObservableRepositoryTrafficClient.cs +++ b/Octokit.Reactive/Clients/ObservableRepositoryTrafficClient.cs @@ -15,29 +15,6 @@ public ObservableRepositoryTrafficClient(IGitHubClient client) _client = client.Repository.Traffic; } - /// - /// List the top 10 popular contents over the last 14 days - /// - /// https://developer.github.com/v3/repos/traffic/#list-paths - /// The owner of the repository - [Obsolete("Please use GetAllPaths instead")] - public IObservable GetPaths(long repositoryId) - { - return GetAllPaths(repositoryId); - } - - /// - /// List the top 10 popular contents over the last 14 days - /// - /// https://developer.github.com/v3/repos/traffic/#list-paths - /// The owner of the repository - /// The name of the repository - [Obsolete("Please use GetAllPaths instead")] - public IObservable GetPaths(string owner, string name) - { - return GetAllPaths(owner, name); - } - /// /// List the top 10 popular contents over the last 14 days /// @@ -62,29 +39,6 @@ public IObservable GetAllPaths(string owner, string name) return _client.GetAllPaths(owner, name).ToObservable().SelectMany(x => x); } - /// - /// List the top 10 referrers over the last 14 days - /// - /// https://developer.github.com/v3/repos/traffic/#list-referrers - /// The owner of the repository - [Obsolete("Please use GetAllReferrers instead")] - public IObservable GetReferrers(long repositoryId) - { - return GetAllReferrers(repositoryId); - } - - /// - /// List the top 10 referrers over the last 14 days - /// - /// https://developer.github.com/v3/repos/traffic/#list-referrers - /// The owner of the repository - /// The name of the repository - [Obsolete("Please use GetAllReferrers instead")] - public IObservable GetReferrers(string owner, string name) - { - return GetAllReferrers(owner, name); - } - /// /// List the top 10 referrers over the last 14 days /// diff --git a/Octokit.Reactive/Clients/ObservableTeamsClient.cs b/Octokit.Reactive/Clients/ObservableTeamsClient.cs index 47d438ae1e..603aae6c4d 100644 --- a/Octokit.Reactive/Clients/ObservableTeamsClient.cs +++ b/Octokit.Reactive/Clients/ObservableTeamsClient.cs @@ -215,22 +215,6 @@ public IObservable Delete(int id) return _client.Delete(id).ToObservable(); } - /// - /// Adds a to a . - /// - /// - /// See the API documentation for more information. - /// - /// The team identifier. - /// The user to add to the team. - [Obsolete("Please use AddOrEditMembership instead")] - public IObservable AddMembership(int id, string login) - { - Ensure.ArgumentNotNullOrEmptyString(login, nameof(login)); - - return _client.AddMembership(id, login).ToObservable(); - } - /// /// Adds a to a . /// @@ -264,20 +248,6 @@ public IObservable RemoveMembership(int id, string login) return _client.RemoveMembership(id, login).ToObservable(); } - /// - /// Gets whether the user with the given - /// is a member of the team with the given . - /// - /// The team to check. - /// The user to check. - [Obsolete("Please use GetMembershipDetails instead")] - public IObservable GetMembership(int id, string login) - { - Ensure.ArgumentNotNullOrEmptyString(login, nameof(login)); - - return _client.GetMembership(id, login).ToObservable(); - } - /// /// Gets whether the user with the given /// is a member of the team with the given . diff --git a/Octokit.Tests.Integration/Clients/RepositoryBranchesClientTests.cs b/Octokit.Tests.Integration/Clients/RepositoryBranchesClientTests.cs index 595d85b01d..5c5dba03a6 100644 --- a/Octokit.Tests.Integration/Clients/RepositoryBranchesClientTests.cs +++ b/Octokit.Tests.Integration/Clients/RepositoryBranchesClientTests.cs @@ -612,12 +612,12 @@ public async Task DeletesRequiredStatusChecksWithRepositoryId() } } - public class TheGetRequiredStatusChecksContextsMethod : IDisposable + public class TheGetAllRequiredStatusChecksContextsMethod : IDisposable { IRepositoryBranchesClient _client; RepositoryContext _userRepoContext; - public TheGetRequiredStatusChecksContextsMethod() + public TheGetAllRequiredStatusChecksContextsMethod() { var github = Helper.GetAuthenticatedClient(); _client = github.Repository.Branch; @@ -630,7 +630,7 @@ public async Task GetsRequiredStatusChecksContexts() { var repoOwner = _userRepoContext.RepositoryOwner; var repoName = _userRepoContext.RepositoryName; - var requiredStatusChecksContexts = await _client.GetRequiredStatusChecksContexts(repoOwner, repoName, "master"); + var requiredStatusChecksContexts = await _client.GetAllRequiredStatusChecksContexts(repoOwner, repoName, "master"); Assert.NotNull(requiredStatusChecksContexts); Assert.Equal(2, requiredStatusChecksContexts.Count); @@ -640,7 +640,7 @@ public async Task GetsRequiredStatusChecksContexts() public async Task GetsRequiredStatusChecksContextsWithRepositoryId() { var repoId = _userRepoContext.RepositoryId; - var requiredStatusChecksContexts = await _client.GetRequiredStatusChecksContexts(repoId, "master"); + var requiredStatusChecksContexts = await _client.GetAllRequiredStatusChecksContexts(repoId, "master"); Assert.NotNull(requiredStatusChecksContexts); Assert.Equal(2, requiredStatusChecksContexts.Count); diff --git a/Octokit.Tests.Integration/Clients/TeamsClientTests.cs b/Octokit.Tests.Integration/Clients/TeamsClientTests.cs index 0df992a65b..bc6563ca6b 100644 --- a/Octokit.Tests.Integration/Clients/TeamsClientTests.cs +++ b/Octokit.Tests.Integration/Clients/TeamsClientTests.cs @@ -200,48 +200,6 @@ public void Dispose() } } - public class TheGetMembershipMethod - { - readonly Team team; - - public TheGetMembershipMethod() - { - var github = Helper.GetAuthenticatedClient(); - - team = github.Organization.Team.GetAll(Helper.Organization).Result.First(); - } - - [OrganizationTest] - public async Task FailsWhenAuthenticatedWithBadCredentials() - { - var github = Helper.GetBadCredentialsClient(); - - var e = await Assert.ThrowsAsync( - () => github.Organization.Team.GetMembership(team.Id, Helper.UserName)); - Assert.Equal(HttpStatusCode.Unauthorized, e.StatusCode); - } - - [OrganizationTest] - public async Task GetsIsMemberWhenAuthenticated() - { - var github = Helper.GetAuthenticatedClient(); - - var membership = await github.Organization.Team.GetMembership(team.Id, Helper.UserName); - - Assert.Equal(TeamMembership.Active, membership); - } - - [OrganizationTest] - public async Task GetsIsMemberFalseForNonMemberWhenAuthenticated() - { - var github = Helper.GetAuthenticatedClient(); - - var membership = await github.Organization.Team.GetMembership(team.Id, "foo"); - - Assert.Equal(TeamMembership.NotFound, membership); - } - } - public class TheGetMembershipDetailsMethod : IDisposable { private readonly IGitHubClient _github; diff --git a/Octokit.Tests.Integration/Helper.cs b/Octokit.Tests.Integration/Helper.cs index 6f89c1339c..15953eb6bf 100644 --- a/Octokit.Tests.Integration/Helper.cs +++ b/Octokit.Tests.Integration/Helper.cs @@ -321,7 +321,7 @@ public static string InviteMemberToTeam(IConnection connection, int teamId, stri try { var client = new GitHubClient(connection); - client.Organization.Team.AddMembership(teamId, login).Wait(TimeSpan.FromSeconds(15)); + client.Organization.Team.AddOrEditMembership(teamId, login, new UpdateTeamMembership(TeamRole.Member)).Wait(TimeSpan.FromSeconds(15)); } catch { } diff --git a/Octokit.Tests/Clients/OrganizationsClientTests.cs b/Octokit.Tests/Clients/OrganizationsClientTests.cs index c246cd529a..2dbf0a2a73 100644 --- a/Octokit.Tests/Clients/OrganizationsClientTests.cs +++ b/Octokit.Tests/Clients/OrganizationsClientTests.cs @@ -44,52 +44,6 @@ public async Task EnsuresNonNullArguments() } } - public class TheGetAllMethod - { - [Fact] - public async Task RequestsTheCorrectUrl() - { - var connection = Substitute.For(); - var client = new OrganizationsClient(connection); - - await client.GetAll("username"); - - connection.Received().GetAll(Arg.Is(u => u.ToString() == "users/username/orgs"), Args.ApiOptions); - } - - [Fact] - public async Task RequestsTheCorrectUrlWithApiOptions() - { - var connection = Substitute.For(); - var client = new OrganizationsClient(connection); - - var options = new ApiOptions - { - StartPage = 1, - PageCount = 1, - PageSize = 1 - }; - - await client.GetAll("username", options); - - connection.Received().GetAll(Arg.Is(u => u.ToString() == "users/username/orgs"), options); - } - - [Fact] - public async Task EnsuresNonNullArguments() - { - var connection = Substitute.For(); - var client = new OrganizationsClient(connection); - - await Assert.ThrowsAsync(() => client.GetAll((string)null)); - await Assert.ThrowsAsync(() => client.GetAll(null, ApiOptions.None)); - await Assert.ThrowsAsync(() => client.GetAll("username", null)); - - await Assert.ThrowsAsync(() => client.GetAll("")); - await Assert.ThrowsAsync(() => client.GetAll("", ApiOptions.None)); - } - } - public class TheGetAllForUserMethod { [Fact] diff --git a/Octokit.Tests/Clients/TeamsClientTests.cs b/Octokit.Tests/Clients/TeamsClientTests.cs index 285887cb48..09f53dc1a1 100644 --- a/Octokit.Tests/Clients/TeamsClientTests.cs +++ b/Octokit.Tests/Clients/TeamsClientTests.cs @@ -213,49 +213,6 @@ public void RequestsTheCorrectUrl() } } - public class TheAddMembershipMethod - { - [Fact] - public async Task RequestsTheCorrectUrl() - { - var connection = Substitute.For(); - - var client = new TeamsClient(connection); - - await client.AddMembership(1, "user"); - - connection.Received().Put>( - Arg.Is(u => u.ToString() == "teams/1/memberships/user"), - Args.Object); - } - - [Fact] - public async Task AllowsEmptyBody() - { - var connection = Substitute.For(); - - var apiConnection = new ApiConnection(connection); - - var client = new TeamsClient(apiConnection); - - await client.AddMembership(1, "user"); - - connection.Received().Put>( - Arg.Is(u => u.ToString() == "teams/1/memberships/user"), - Arg.Is(u => u == RequestBody.Empty)); - } - - [Fact] - public async Task EnsuresNonNullOrEmptyLogin() - { - var connection = Substitute.For(); - var client = new TeamsClient(connection); - - await Assert.ThrowsAsync(() => client.AddMembership(1, null)); - await Assert.ThrowsAsync(() => client.AddMembership(1, "")); - } - } - public class TheAddOrEditMembershipMethod { [Fact] @@ -304,27 +261,6 @@ public void RequestsTheCorrectUrl() } } - public class TheGetMembershipMethod - { - [Fact] - public async Task EnsuresNonNullLogin() - { - var connection = Substitute.For(); - var client = new TeamsClient(connection); - - await Assert.ThrowsAsync(() => client.GetMembership(1, null)); - } - - [Fact] - public async Task EnsuresNonEmptyLogin() - { - var connection = Substitute.For(); - var client = new TeamsClient(connection); - - await Assert.ThrowsAsync(() => client.GetMembership(1, "")); - } - } - public class TheGetMembershipDetailsMethod { [Fact] diff --git a/Octokit.Tests/Reactive/ObservableOrganizationsClientTests.cs b/Octokit.Tests/Reactive/ObservableOrganizationsClientTests.cs index 26324833c2..21eda991c2 100644 --- a/Octokit.Tests/Reactive/ObservableOrganizationsClientTests.cs +++ b/Octokit.Tests/Reactive/ObservableOrganizationsClientTests.cs @@ -40,7 +40,7 @@ public void EnsuresNonNullArguments() } } - public class TheGetAllMethod + public class TheGetAllForUserMethod { [Fact] public void RequestsTheCorrectUrl() @@ -48,9 +48,9 @@ public void RequestsTheCorrectUrl() var gitHubClient = Substitute.For(); var client = new ObservableOrganizationsClient(gitHubClient); - client.GetAll("username"); + client.GetAllForUser("username"); - gitHubClient.Received().Organization.GetAll("username"); + gitHubClient.Received().Organization.GetAllForUser("username"); } [Fact] @@ -66,9 +66,9 @@ public void RequestsTheCorrectUrlWithApiOptions() PageSize = 1 }; - client.GetAll("username", options); + client.GetAllForUser("username", options); - gitHubClient.Received().Organization.GetAll("username", options); + gitHubClient.Received().Organization.GetAllForUser("username", options); } [Fact] @@ -77,12 +77,12 @@ public void EnsuresNonNullArguments() var gitHubClient = Substitute.For(); var client = new ObservableOrganizationsClient(gitHubClient); - Assert.Throws(() => client.GetAll((string)null)); - Assert.Throws(() => client.GetAll(null, ApiOptions.None)); - Assert.Throws(() => client.GetAll("username", null)); + Assert.Throws(() => client.GetAllForUser((string)null)); + Assert.Throws(() => client.GetAllForUser(null, ApiOptions.None)); + Assert.Throws(() => client.GetAllForUser("username", null)); - Assert.Throws(() => client.GetAll("")); - Assert.Throws(() => client.GetAll("", ApiOptions.None)); + Assert.Throws(() => client.GetAllForUser("")); + Assert.Throws(() => client.GetAllForUser("", ApiOptions.None)); } } diff --git a/Octokit/Clients/IOrganizationsClient.cs b/Octokit/Clients/IOrganizationsClient.cs index 43c2ed66ca..2d915cc42d 100644 --- a/Octokit/Clients/IOrganizationsClient.cs +++ b/Octokit/Clients/IOrganizationsClient.cs @@ -58,24 +58,6 @@ public interface IOrganizationsClient Justification = "Method makes a network request")] Task> GetAllForCurrent(ApiOptions options); - /// - /// Returns all s for the specified user. - /// - /// Thrown when a general API error occurs. - /// A list of the specified user's s. - [Obsolete("Please use IOrganizationsClient.GetAllForUser() instead. This method will be removed in a future version")] - Task> GetAll(string user); - - /// - /// Returns all s for the specified user. - /// - /// The login of the user - /// Options for changing the API response - /// Thrown when a general API error occurs. - /// A list of the specified user's s. - [Obsolete("Please use IOrganizationsClient.GetAllForUser() instead. This method will be removed in a future version")] - Task> GetAll(string user, ApiOptions options); - /// /// Returns all s for the specified user. /// diff --git a/Octokit/Clients/IPullRequestsClient.cs b/Octokit/Clients/IPullRequestsClient.cs index bd211312c6..639c9c4f7c 100644 --- a/Octokit/Clients/IPullRequestsClient.cs +++ b/Octokit/Clients/IPullRequestsClient.cs @@ -13,12 +13,6 @@ namespace Octokit /// public interface IPullRequestsClient { - /// - /// 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 reviews. /// diff --git a/Octokit/Clients/IRepositoryBranchesClient.cs b/Octokit/Clients/IRepositoryBranchesClient.cs index 6422199cf4..eec7c6026c 100644 --- a/Octokit/Clients/IRepositoryBranchesClient.cs +++ b/Octokit/Clients/IRepositoryBranchesClient.cs @@ -207,29 +207,6 @@ public interface IRepositoryBranchesClient /// The name of the branch Task DeleteRequiredStatusChecks(long repositoryId, string branch); - /// - /// Get the required status checks contexts for the specified branch - /// - /// - /// See the API documentation for more details - /// - /// The owner of the repository - /// The name of the repository - /// The name of the branch - [Obsolete("Please use GetAllRequiredStatusCheckContexts instead")] - Task> GetRequiredStatusChecksContexts(string owner, string name, string branch); - - /// - /// Get the required status checks contexts for the specified branch - /// - /// - /// See the API documentation for more details - /// - /// The Id of the repository - /// The name of the branch - [Obsolete("Please use GetAllRequiredStatusCheckContexts instead")] - Task> GetRequiredStatusChecksContexts(long repositoryId, string branch); - /// /// Get the required status checks contexts for the specified branch /// @@ -492,29 +469,6 @@ public interface IRepositoryBranchesClient /// The name of the branch Task DeleteProtectedBranchRestrictions(long repositoryId, string branch); - /// - /// Get team restrictions for the specified branch (applies only to Organization owned repositories) - /// - /// - /// See the API documentation for more details - /// - /// The owner of the repository - /// The name of the repository - /// The name of the branch - [Obsolete("Please use GetAllProtectedBranchTeamRestrictions instead")] - Task> GetProtectedBranchTeamRestrictions(string owner, string name, string branch); - - /// - /// Get team restrictions for the specified branch (applies only to Organization owned repositories) - /// - /// - /// See the API documentation for more details - /// - /// The Id of the repository - /// The name of the branch - [Obsolete("Please use GetAllProtectedBranchTeamRestrictions instead")] - Task> GetProtectedBranchTeamRestrictions(long repositoryId, string branch); - /// /// Get team restrictions for the specified branch (applies only to Organization owned repositories) /// @@ -607,29 +561,6 @@ public interface IRepositoryBranchesClient /// List of teams to remove Task> DeleteProtectedBranchTeamRestrictions(long repositoryId, string branch, BranchProtectionTeamCollection teams); - /// - /// Get user restrictions for the specified branch (applies only to Organization owned repositories) - /// - /// - /// See the API documentation for more details - /// - /// The owner of the repository - /// The name of the repository - /// The name of the branch - [Obsolete("Please use GetAllProtectedBranchUserRestrictions instead")] - Task> GetProtectedBranchUserRestrictions(string owner, string name, string branch); - - /// - /// Get user restrictions for the specified branch (applies only to Organization owned repositories) - /// - /// - /// See the API documentation for more details - /// - /// The Id of the repository - /// The name of the branch - [Obsolete("Please use GetAllProtectedBranchUserRestrictions instead")] - Task> GetProtectedBranchUserRestrictions(long repositoryId, string branch); - /// /// Get user restrictions for the specified branch (applies only to Organization owned repositories) /// diff --git a/Octokit/Clients/IRepositoryTrafficClient.cs b/Octokit/Clients/IRepositoryTrafficClient.cs index a6f9d3d327..343680f5d5 100644 --- a/Octokit/Clients/IRepositoryTrafficClient.cs +++ b/Octokit/Clients/IRepositoryTrafficClient.cs @@ -12,29 +12,6 @@ namespace Octokit /// public interface IRepositoryTrafficClient { - /// - /// List the top 10 referrers over the last 14 days - /// - /// https://developer.github.com/v3/repos/traffic/#list-referrers - /// The owner of the repository - /// The name of the repository - [Obsolete("Please use GetAllReferrers instead")] - Task> GetReferrers(string owner, string name); - - /// - /// List the top 10 referrers over the last 14 days - /// - /// https://developer.github.com/v3/repos/traffic/#list-referrers - /// The owner of the repository - [Obsolete("Please use GetAllReferrers instead")] - Task> GetReferrers(long repositoryId); - - /// - /// List the top 10 referrers over the last 14 days - /// - /// https://developer.github.com/v3/repos/traffic/#list-referrers - /// The owner of the repository - /// The name of the repository [ExcludeFromPaginationApiOptionsConventionTest("Pagination not supported by GitHub API (tested 29/08/2017)")] Task> GetAllReferrers(string owner, string name); @@ -46,23 +23,6 @@ public interface IRepositoryTrafficClient [ExcludeFromPaginationApiOptionsConventionTest("Pagination not supported by GitHub API (tested 29/08/2017)")] Task> GetAllReferrers(long repositoryId); - /// - /// List the top 10 popular contents over the last 14 days - /// - /// https://developer.github.com/v3/repos/traffic/#list-paths - /// The owner of the repository - /// The name of the repository - [Obsolete("Please use GetAllPaths instead")] - Task> GetPaths(string owner, string name); - - /// - /// List the top 10 popular contents over the last 14 days - /// - /// https://developer.github.com/v3/repos/traffic/#list-paths - /// The owner of the repository - [Obsolete("Please use GetAllPaths instead")] - Task> GetPaths(long repositoryId); - /// /// List the top 10 popular contents over the last 14 days /// diff --git a/Octokit/Clients/ITeamsClient.cs b/Octokit/Clients/ITeamsClient.cs index c893139118..ec3321d081 100644 --- a/Octokit/Clients/ITeamsClient.cs +++ b/Octokit/Clients/ITeamsClient.cs @@ -139,17 +139,6 @@ public interface ITeamsClient /// Task Delete(int id); - /// - /// Adds a to a . - /// - /// - /// See the API documentation for more information. - /// - /// The team identifier. - /// The user to add to the team. - [Obsolete("Please use AddOrEditMembership instead")] - Task AddMembership(int id, string login); - /// /// Adds a to a . /// @@ -172,15 +161,6 @@ public interface ITeamsClient /// if the user was removed from the team; otherwise. Task RemoveMembership(int id, string login); - /// - /// Gets whether the user with the given - /// is a member of the team with the given . - /// - /// The team to check. - /// The user to check. - [Obsolete("Please use GetMembershipDetails instead")] - Task GetMembership(int id, string login); - /// /// Gets whether the user with the given /// is a member of the team with the given . diff --git a/Octokit/Clients/OrganizationsClient.cs b/Octokit/Clients/OrganizationsClient.cs index b59eec8bb9..02d8eb2f2e 100644 --- a/Octokit/Clients/OrganizationsClient.cs +++ b/Octokit/Clients/OrganizationsClient.cs @@ -74,36 +74,6 @@ public Task> GetAllForCurrent(ApiOptions options) return ApiConnection.GetAll(ApiUrls.UserOrganizations(), options); } - /// - /// Returns all s for the specified user. - /// - /// The login of the user - /// Thrown when a general API error occurs. - /// A list of the specified user's s. - [Obsolete("Please use OrganizationsClient.GetAllForUser() instead. This method will be removed in a future version")] - public Task> GetAll(string user) - { - Ensure.ArgumentNotNullOrEmptyString(user, nameof(user)); - - return GetAll(user, ApiOptions.None); - } - - /// - /// Returns all s for the specified user. - /// - /// The login of the user - /// Options for changing the API response - /// Thrown when a general API error occurs. - /// A list of the specified user's s. - [Obsolete("Please use OrganizationsClient.GetAllForUser() instead. This method will be removed in a future version")] - public Task> GetAll(string user, ApiOptions options) - { - Ensure.ArgumentNotNullOrEmptyString(user, nameof(user)); - Ensure.ArgumentNotNull(options, nameof(options)); - - return ApiConnection.GetAll(ApiUrls.UserOrganizations(user), options); - } - /// /// Returns all s for the specified user. /// diff --git a/Octokit/Clients/PullRequestsClient.cs b/Octokit/Clients/PullRequestsClient.cs index fd73e8ef45..844dd8f337 100644 --- a/Octokit/Clients/PullRequestsClient.cs +++ b/Octokit/Clients/PullRequestsClient.cs @@ -20,12 +20,6 @@ public PullRequestsClient(IApiConnection apiConnection) : base(apiConnection) ReviewRequest = new PullRequestReviewRequestsClient(apiConnection); } - /// - /// Client for managing review comments. - /// - [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 reviews. /// diff --git a/Octokit/Clients/RepositoryBranchesClient.cs b/Octokit/Clients/RepositoryBranchesClient.cs index e633916569..ddd7197e2b 100644 --- a/Octokit/Clients/RepositoryBranchesClient.cs +++ b/Octokit/Clients/RepositoryBranchesClient.cs @@ -361,35 +361,6 @@ public async Task DeleteRequiredStatusChecks(long repositoryId, string bra } } - /// - /// Get the required status checks contexts for the specified branch - /// - /// - /// See the API documentation for more details - /// - /// The owner of the repository - /// The name of the repository - /// The name of the branch - [Obsolete("Please use GetAllRequiredStatusChecksContexts instead")] - public Task> GetRequiredStatusChecksContexts(string owner, string name, string branch) - { - return GetAllRequiredStatusChecksContexts(owner, name, branch); - } - - /// - /// Get the required status checks contexts for the specified branch - /// - /// - /// See the API documentation for more details - /// - /// The Id of the repository - /// The name of the branch - [Obsolete("Please use GetAllRequiredStatusChecksContexts instead")] - public Task> GetRequiredStatusChecksContexts(long repositoryId, string branch) - { - return GetAllRequiredStatusChecksContexts(repositoryId, branch); - } - /// /// Get the required status checks contexts for the specified branch /// @@ -862,35 +833,6 @@ public async Task DeleteProtectedBranchRestrictions(long repositoryId, str } } - /// - /// Get team restrictions for the specified branch (applies only to Organization owned repositories) - /// - /// - /// See the API documentation for more details - /// - /// The owner of the repository - /// The name of the repository - /// The name of the branch - [Obsolete("Please use GetAllProtectedBranchTeamRestrictions instead")] - public Task> GetProtectedBranchTeamRestrictions(string owner, string name, string branch) - { - return GetAllProtectedBranchTeamRestrictions(owner, name, branch); - } - - /// - /// Get team restrictions for the specified branch (applies only to Organization owned repositories) - /// - /// - /// See the API documentation for more details - /// - /// The Id of the repository - /// The name of the branch - [Obsolete("Please use GetAllProtectedBranchTeamRestrictions instead")] - public Task> GetProtectedBranchTeamRestrictions(long repositoryId, string branch) - { - return GetAllProtectedBranchTeamRestrictions(repositoryId, branch); - } - /// /// Get team restrictions for the specified branch (applies only to Organization owned repositories) /// @@ -1035,35 +977,6 @@ public Task> DeleteProtectedBranchTeamRestrictions(long repo return ApiConnection.Delete>(ApiUrls.RepoRestrictionsTeams(repositoryId, branch), teams, AcceptHeaders.ProtectedBranchesApiPreview); } - /// - /// Get user restrictions for the specified branch (applies only to Organization owned repositories) - /// - /// - /// See the API documentation for more details - /// - /// The owner of the repository - /// The name of the repository - /// The name of the branch - [Obsolete("Please use GetAllProtectedBranchUserRestrictions instead")] - public Task> GetProtectedBranchUserRestrictions(string owner, string name, string branch) - { - return GetAllProtectedBranchUserRestrictions(owner, name, branch); - } - - /// - /// Get user restrictions for the specified branch (applies only to Organization owned repositories) - /// - /// - /// See the API documentation for more details - /// - /// The Id of the repository - /// The name of the branch - [Obsolete("Please use GetAllProtectedBranchUserRestrictions instead")] - public Task> GetProtectedBranchUserRestrictions(long repositoryId, string branch) - { - return GetAllProtectedBranchUserRestrictions(repositoryId, branch); - } - /// /// Get user restrictions for the specified branch (applies only to Organization owned repositories) /// diff --git a/Octokit/Clients/RepositoryTrafficClient.cs b/Octokit/Clients/RepositoryTrafficClient.cs index 4df2640b0e..e3d9ef41fa 100644 --- a/Octokit/Clients/RepositoryTrafficClient.cs +++ b/Octokit/Clients/RepositoryTrafficClient.cs @@ -10,29 +10,6 @@ public RepositoryTrafficClient(IApiConnection apiConnection) : base(apiConnectio { } - /// - /// List the top 10 popular contents over the last 14 days - /// - /// https://developer.github.com/v3/repos/traffic/#list-paths - /// The owner of the repository - [Obsolete("Please use GetAllPaths instead")] - public Task> GetPaths(long repositoryId) - { - return GetAllPaths(repositoryId); - } - - /// - /// List the top 10 popular contents over the last 14 days - /// - /// https://developer.github.com/v3/repos/traffic/#list-paths - /// The owner of the repository - /// The name of the repository - [Obsolete("Please use GetAllPaths instead")] - public Task> GetPaths(string owner, string name) - { - return GetAllPaths(owner, name); - } - /// /// List the top 10 popular contents over the last 14 days /// @@ -57,29 +34,6 @@ public Task> GetAllPaths(string owner, stri return ApiConnection.GetAll(ApiUrls.RepositoryTrafficPaths(owner, name), AcceptHeaders.RepositoryTrafficApiPreview); } - /// - /// List the top 10 referrers over the last 14 days - /// - /// https://developer.github.com/v3/repos/traffic/#list-referrers - /// The owner of the repository - [Obsolete("Please use GetAllReferrers instead")] - public Task> GetReferrers(long repositoryId) - { - return GetAllReferrers(repositoryId); - } - - /// - /// List the top 10 referrers over the last 14 days - /// - /// https://developer.github.com/v3/repos/traffic/#list-referrers - /// The owner of the repository - /// The name of the repository - [Obsolete("Please use GetAllReferrers instead")] - public Task> GetReferrers(string owner, string name) - { - return GetAllReferrers(owner, name); - } - /// /// List the top 10 referrers over the last 14 days /// diff --git a/Octokit/Clients/TeamsClient.cs b/Octokit/Clients/TeamsClient.cs index ebc934eccb..a6c2837f0d 100644 --- a/Octokit/Clients/TeamsClient.cs +++ b/Octokit/Clients/TeamsClient.cs @@ -181,35 +181,6 @@ public Task> GetAllMembers(int id, TeamMembersRequest reques return ApiConnection.GetAll(endpoint, request.ToParametersDictionary(), AcceptHeaders.NestedTeamsPreview, options); } - /// - /// Gets whether the user with the given - /// is a member of the team with the given . - /// - /// The team to check. - /// The user to check. - [Obsolete("Please use GetMembershipDetails instead")] - public async Task GetMembership(int id, string login) - { - Ensure.ArgumentNotNullOrEmptyString(login, nameof(login)); - - var endpoint = ApiUrls.TeamMember(id, login); - - Dictionary response; - - try - { - response = await ApiConnection.Get>(endpoint, null, AcceptHeaders.NestedTeamsPreview).ConfigureAwait(false); - } - catch (NotFoundException) - { - return TeamMembership.NotFound; - } - - return response["state"] == "active" - ? TeamMembership.Active - : TeamMembership.Pending; - } - /// /// Gets whether the user with the given /// is a member of the team with the given . @@ -268,42 +239,6 @@ public Task Delete(int id) return ApiConnection.Delete(endpoint, new object(), AcceptHeaders.NestedTeamsPreview); } - /// - /// Adds a to a . - /// - /// - /// See the API documentation for more information. - /// - /// The team identifier. - /// The user to add to the team. - [Obsolete("Please use AddOrEditMembership instead")] - public async Task AddMembership(int id, string login) - { - Ensure.ArgumentNotNullOrEmptyString(login, nameof(login)); - - var endpoint = ApiUrls.TeamMember(id, login); - - Dictionary response; - - try - { - response = await ApiConnection.Put>(endpoint, RequestBody.Empty).ConfigureAwait(false); - } - catch (NotFoundException) - { - return TeamMembership.NotFound; - } - - if (response == null || !response.ContainsKey("state")) - { - return TeamMembership.NotFound; - } - - return response["state"] == "active" - ? TeamMembership.Active - : TeamMembership.Pending; - } - /// /// Adds a to a . /// diff --git a/Octokit/Helpers/ApiUrls.cs b/Octokit/Helpers/ApiUrls.cs index 4f8e949a90..f2f1d7f70e 100644 --- a/Octokit/Helpers/ApiUrls.cs +++ b/Octokit/Helpers/ApiUrls.cs @@ -69,27 +69,6 @@ public static Uri OrganizationRepositories(string organization) return "orgs/{0}/repos".FormatUri(organization); } - /// - /// Returns the that returns all of the organizations for the currently logged in user. - /// - /// - [Obsolete("Please use ApiUrls.UserOrganizations() instead. This method will be removed in a future version")] - public static Uri Organizations() - { - return _currentUserOrganizationsUrl; - } - - /// - /// Returns the that returns all of the organizations for the specified login. - /// - /// The login for the user - /// - [Obsolete("Please use ApiUrls.UserOrganizations() instead. This method will be removed in a future version")] - public static Uri Organizations(string login) - { - return "users/{0}/orgs".FormatUri(login); - } - /// /// Returns the that returns all of the organizations for the currently logged in user. /// diff --git a/Octokit/Models/Request/BranchProtectionUpdate.cs b/Octokit/Models/Request/BranchProtectionUpdate.cs index d0bed57070..eda3c0a813 100644 --- a/Octokit/Models/Request/BranchProtectionUpdate.cs +++ b/Octokit/Models/Request/BranchProtectionUpdate.cs @@ -64,21 +64,6 @@ public BranchProtectionSettingsUpdate(bool enforceAdmins) EnforceAdmins = enforceAdmins; } - /// - /// Create a BranchProtection update request - /// - /// Specifies the requested status check settings. Pass null to disable status checks - /// Specifies the requested push access restrictions (applies only to Organization owned repositories). Pass null to disable push access restrictions - /// Specifies whether the protections applied to this branch also apply to repository admins - [Obsolete("This constructor will be removed for housekeeping purposes, please use another ctor")] - public BranchProtectionSettingsUpdate(BranchProtectionRequiredStatusChecksUpdate requiredStatusChecks, BranchProtectionPushRestrictionsUpdate restrictions, bool enforceAdmins) - { - RequiredStatusChecks = requiredStatusChecks; - RequiredPullRequestReviews = null; - Restrictions = restrictions; - EnforceAdmins = enforceAdmins; - } - /// /// Create a BranchProtection update request /// diff --git a/Octokit/Models/Request/IssueUpdate.cs b/Octokit/Models/Request/IssueUpdate.cs index fd13444138..7669abe1b1 100644 --- a/Octokit/Models/Request/IssueUpdate.cs +++ b/Octokit/Models/Request/IssueUpdate.cs @@ -22,15 +22,6 @@ public class IssueUpdate /// public string Body { get; set; } - /// - /// Login for the user that this issue should be assigned to. - /// - /// - /// Only users with push access can set the assignee for new issues. The assignee is silently dropped otherwise. - /// - [Obsolete("Please use Assignees property. This property will no longer be supported by the GitHub API and will be removed in a future version")] - public string Assignee { get; set; } - /// /// List of logins for the multiple users that this issue should be assigned to /// diff --git a/Octokit/Models/Request/NewIssue.cs b/Octokit/Models/Request/NewIssue.cs index 417aa0cd61..9cbea403fa 100644 --- a/Octokit/Models/Request/NewIssue.cs +++ b/Octokit/Models/Request/NewIssue.cs @@ -32,15 +32,6 @@ public NewIssue(string title) /// public string Body { get; set; } - /// - /// Login for the user that this issue should be assigned to. - /// - /// - /// Only users with push access can set the assignee for new issues. The assignee is silently dropped otherwise. - /// - [Obsolete("Please use Assignees property. This property will no longer be supported by the GitHub API and will be removed in a future version")] - public string Assignee { get; set; } - /// /// List of logins for the multiple users that this issue should be assigned to /// diff --git a/Octokit/Models/Request/UpdateTeam.cs b/Octokit/Models/Request/UpdateTeam.cs index 8724a02d7b..b23000072d 100644 --- a/Octokit/Models/Request/UpdateTeam.cs +++ b/Octokit/Models/Request/UpdateTeam.cs @@ -19,18 +19,6 @@ public UpdateTeam(string name) Name = name; } - /// - /// Initializes a new instance of the class. - /// - /// The updated team name. - /// The permission. - [Obsolete("This constructor will be removed for housekeeping purposes")] - public UpdateTeam(string name, Permission permission) - { - Name = name; - Permission = permission; - } - /// /// The name of the team (required). /// diff --git a/Octokit/Models/Response/TeamMembership.cs b/Octokit/Models/Response/TeamMembership.cs deleted file mode 100644 index fc865c9791..0000000000 --- a/Octokit/Models/Response/TeamMembership.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; - -namespace Octokit -{ - [Obsolete("Please use TeamMembershipDetails response class instead")] - public enum TeamMembership - { - NotFound = 0, - Pending = 1, - Active = 2 - } -}