diff --git a/Octokit.Reactive/Clients/IObservablePullRequestsClient.cs b/Octokit.Reactive/Clients/IObservablePullRequestsClient.cs index 5b7fb37128..73dadb39e7 100644 --- a/Octokit.Reactive/Clients/IObservablePullRequestsClient.cs +++ b/Octokit.Reactive/Clients/IObservablePullRequestsClient.cs @@ -21,7 +21,7 @@ public interface IObservablePullRequestsClient /// Client for managing reviews. /// IObservablePullRequestReviewsClient Review { get; } - + /// /// Client for managing review comments. /// diff --git a/Octokit.Reactive/Clients/ObservablePullRequestReviewsClient.cs b/Octokit.Reactive/Clients/ObservablePullRequestReviewsClient.cs index 3debbc94be..e13fcdde46 100644 --- a/Octokit.Reactive/Clients/ObservablePullRequestReviewsClient.cs +++ b/Octokit.Reactive/Clients/ObservablePullRequestReviewsClient.cs @@ -35,7 +35,7 @@ public ObservablePullRequestReviewsClient(IGitHubClient client) public IObservable Create(string owner, string name, int number, PullRequestReviewCreate review) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); - Ensure.ArgumentNotNullOrEmptyString(name,nameof(name)); + Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); Ensure.ArgumentNotNull(review, nameof(review)); return _client.Create(owner, name, number, review).ToObservable(); } @@ -65,7 +65,7 @@ public IObservable Create(long repositoryId, int number, Pull public IObservable Delete(string owner, string name, int number, long reviewId) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); - Ensure.ArgumentNotNullOrEmptyString(name,nameof(name)); + Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); return _client.Delete(owner, name, number, reviewId).ToObservable(); } @@ -94,7 +94,7 @@ public IObservable Delete(long repositoryId, int number, long reviewId) public IObservable Dismiss(string owner, string name, int number, long reviewId, PullRequestReviewDismiss dismissMessage) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); - Ensure.ArgumentNotNullOrEmptyString(name,nameof(name)); + Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); Ensure.ArgumentNotNull(dismissMessage, nameof(dismissMessage)); return _client.Dismiss(owner, name, number, reviewId, dismissMessage).ToObservable(); @@ -125,7 +125,7 @@ public IObservable Dismiss(long repositoryId, int number, lon public IObservable GetAll(string owner, string name, int number) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); - Ensure.ArgumentNotNullOrEmptyString(name,nameof(name)); + Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); return GetAll(owner, name, number, ApiOptions.None); } @@ -152,7 +152,7 @@ public IObservable GetAll(long repositoryId, int number) public IObservable GetAll(string owner, string name, int number, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); - Ensure.ArgumentNotNullOrEmptyString(name,nameof(name)); + Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); Ensure.ArgumentNotNull(options, nameof(options)); return _connection.GetAndFlattenAllPages(ApiUrls.PullRequestReviews(owner, name, number), null, null, options); @@ -183,7 +183,7 @@ public IObservable GetAll(long repositoryId, int number, ApiO public IObservable Get(string owner, string name, int number, long reviewId) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); - Ensure.ArgumentNotNullOrEmptyString(name,nameof(name)); + Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); return _client.Get(owner, name, number, reviewId).ToObservable(); } @@ -212,7 +212,7 @@ public IObservable Get(long repositoryId, int number, long re public IObservable Submit(string owner, string name, int number, long reviewId, PullRequestReviewSubmit submitMessage) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); - Ensure.ArgumentNotNullOrEmptyString(name,nameof(name)); + Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); Ensure.ArgumentNotNull(submitMessage, nameof(submitMessage)); return _client.Submit(owner, name, number, reviewId, submitMessage).ToObservable(); @@ -269,7 +269,7 @@ public IObservable GetAllComments(long repositoryId, i public IObservable GetAllComments(string owner, string name, int number, long reviewId, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); - Ensure.ArgumentNotNullOrEmptyString(name,nameof(name)); + Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); Ensure.ArgumentNotNull(options, nameof(options)); return _connection.GetAndFlattenAllPages(ApiUrls.PullRequestReviewComments(owner, name, number, reviewId), options); @@ -286,7 +286,7 @@ public IObservable GetAllComments(long repositoryId, i { Ensure.ArgumentNotNull(options, nameof(options)); - return _connection.GetAndFlattenAllPages(ApiUrls.PullRequestReviewComments(repositoryId, number, reviewId),options); + return _connection.GetAndFlattenAllPages(ApiUrls.PullRequestReviewComments(repositoryId, number, reviewId), options); } } } diff --git a/Octokit.Tests.Integration/Clients/OrganizationOutsideCollaboratorsClientTests.cs b/Octokit.Tests.Integration/Clients/OrganizationOutsideCollaboratorsClientTests.cs index 55b86ca0a6..1c71a107b2 100644 --- a/Octokit.Tests.Integration/Clients/OrganizationOutsideCollaboratorsClientTests.cs +++ b/Octokit.Tests.Integration/Clients/OrganizationOutsideCollaboratorsClientTests.cs @@ -258,7 +258,7 @@ public async Task CanRemoveOutsideCollaborator() [OrganizationTest] public async Task CannotRemoveMemberOfOrganizationAsOutsideCollaborator() { - var ex = await Assert.ThrowsAsync(() + var ex = await Assert.ThrowsAsync(() => _gitHub.Organization.OutsideCollaborator.Delete(Helper.Organization, Helper.UserName)); Assert.True(string.Equals( diff --git a/Octokit.Tests.Integration/Clients/ProjectsClientTests.cs b/Octokit.Tests.Integration/Clients/ProjectsClientTests.cs index 64bd5bc255..1f20a2abe9 100644 --- a/Octokit.Tests.Integration/Clients/ProjectsClientTests.cs +++ b/Octokit.Tests.Integration/Clients/ProjectsClientTests.cs @@ -53,7 +53,7 @@ public async Task GetsAllFilteredProjectsForRepository() { var project1 = await CreateRepositoryProjectHelper(_github, _context.RepositoryId); var project2 = await CreateRepositoryProjectHelper(_github, _context.RepositoryId); - + // Make 2nd project closed var result = await _github.Repository.Project.Update(project2.Id, new ProjectUpdate { State = ItemState.Closed }); @@ -236,7 +236,7 @@ public async Task GetsAllProjects() public async Task GetsAllFilteredProjectsForRepository() { var project = await CreateOrganizationProjectHelper(_github, Helper.Organization); - + // Make project closed var result = await _github.Repository.Project.Update(project.Id, new ProjectUpdate { State = ItemState.Closed }); diff --git a/Octokit.Tests.Integration/Clients/PullRequestReviewRequestsClientTests.cs b/Octokit.Tests.Integration/Clients/PullRequestReviewRequestsClientTests.cs index 9d8ed3324c..b139b3b145 100644 --- a/Octokit.Tests.Integration/Clients/PullRequestReviewRequestsClientTests.cs +++ b/Octokit.Tests.Integration/Clients/PullRequestReviewRequestsClientTests.cs @@ -87,7 +87,7 @@ public async Task GetsRequestsWithRepositoryId() public async Task ReturnsCorrectCountOfReviewRequestsWithStart() { var number = await CreateTheWorld(_github, _context); - + var options = new ApiOptions { PageSize = 1, @@ -107,7 +107,7 @@ public async Task ReturnsCorrectCountOfReviewRequestsWithStartWithRepositoryId() var options = new ApiOptions { PageSize = 1, - PageCount = 2, + PageCount = 1, StartPage = 2 }; var reviewRequests = await _client.GetAll(_context.RepositoryId, number, options); @@ -119,7 +119,7 @@ public async Task ReturnsCorrectCountOfReviewRequestsWithStartWithRepositoryId() public async Task ReturnsDistinctResultsBasedOnStartPage() { var number = await CreateTheWorld(_github, _context); - + var startOptions = new ApiOptions { PageSize = 1, @@ -144,7 +144,7 @@ public async Task ReturnsDistinctResultsBasedOnStartPage() public async Task ReturnsDistinctResultsBasedOnStartPageWithRepositoryId() { var number = await CreateTheWorld(_github, _context); - + var startOptions = new ApiOptions { PageSize = 1, @@ -172,7 +172,7 @@ public class TheDeleteMethod : PullRequestReviewRequestClientTestsBase public async Task DeletesRequests() { var number = await CreateTheWorld(_github, _context); - + var reviewRequestsBeforeDelete = await _client.GetAll(_context.RepositoryOwner, _context.RepositoryName, number); var reviewRequestToCreate = new PullRequestReviewRequest(_collaboratorLogins); await _client.Delete(_context.RepositoryOwner, _context.RepositoryName, number, reviewRequestToCreate); @@ -186,11 +186,11 @@ public async Task DeletesRequests() public async Task DeletesRequestsWithRepositoryId() { var number = await CreateTheWorld(_github, _context); - - var reviewRequestsBeforeDelete = await _client.GetAll(_context.RepositoryId, number); + + var reviewRequestsBeforeDelete = await _client.GetAll(_context.RepositoryId, number); var reviewRequestToCreate = new PullRequestReviewRequest(_collaboratorLogins); await _client.Delete(_context.RepositoryId, number, reviewRequestToCreate); - var reviewRequestsAfterDelete = await _client.GetAll(_context.RepositoryId, number); + var reviewRequestsAfterDelete = await _client.GetAll(_context.RepositoryId, number); Assert.NotEmpty(reviewRequestsBeforeDelete); Assert.Empty(reviewRequestsAfterDelete); diff --git a/Octokit.Tests.Integration/Clients/ReleasesClientTests.cs b/Octokit.Tests.Integration/Clients/ReleasesClientTests.cs index 472dd09aca..b06f4cfc10 100644 --- a/Octokit.Tests.Integration/Clients/ReleasesClientTests.cs +++ b/Octokit.Tests.Integration/Clients/ReleasesClientTests.cs @@ -788,7 +788,7 @@ public async Task CanDeleteAsset() await _releaseClient.DeleteAsset(_context.RepositoryOwner, _context.RepositoryName, result.Id); - await Assert.ThrowsAsync(async () => await _releaseClient.DeleteAsset(_context.RepositoryOwner, _context.RepositoryName, result.Id)); + await Assert.ThrowsAsync(async () => await _releaseClient.GetAsset(_context.RepositoryOwner, _context.RepositoryName, result.Id)); } [IntegrationTest] @@ -806,7 +806,9 @@ public async Task CanDeleteAssetWithRepositoryId() Assert.NotNull(asset); - await Assert.ThrowsAsync(async () => await _releaseClient.DeleteAsset(_context.Repository.Id, result.Id)); + await _releaseClient.DeleteAsset(_context.Repository.Id, result.Id); + + await Assert.ThrowsAsync(async () => await _releaseClient.GetAsset(_context.Repository.Id, result.Id)); } } diff --git a/Octokit.Tests.Integration/Clients/RepositoriesClientTests.cs b/Octokit.Tests.Integration/Clients/RepositoriesClientTests.cs index 8b40dafa3a..179d702242 100644 --- a/Octokit.Tests.Integration/Clients/RepositoriesClientTests.cs +++ b/Octokit.Tests.Integration/Clients/RepositoriesClientTests.cs @@ -700,9 +700,9 @@ public async Task ReturnsForkedRepository() { var github = Helper.GetAuthenticatedClient(); - var repository = await github.Repository.Get("haacked", "libgit2sharp"); + var repository = await github.Repository.Get("octokitnet-test1", "octokit.net"); - Assert.Equal("https://github.com/Haacked/libgit2sharp.git", repository.CloneUrl); + Assert.Equal("https://github.com/octokitnet-test1/octokit.net.git", repository.CloneUrl); Assert.True(repository.Fork); } @@ -711,9 +711,9 @@ public async Task ReturnsForkedRepositoryWithRepositoryId() { var github = Helper.GetAuthenticatedClient(); - var repository = await github.Repository.Get(4550038); + var repository = await github.Repository.Get(100559458); - Assert.Equal("https://github.com/Haacked/libgit2sharp.git", repository.CloneUrl); + Assert.Equal("https://github.com/octokitnet-test1/octokit.net.git", repository.CloneUrl); Assert.True(repository.Fork); } diff --git a/Octokit.Tests.Integration/Clients/RepositoryCollaboratorClientTests.cs b/Octokit.Tests.Integration/Clients/RepositoryCollaboratorClientTests.cs index 9bd37a9b96..0859a81431 100644 --- a/Octokit.Tests.Integration/Clients/RepositoryCollaboratorClientTests.cs +++ b/Octokit.Tests.Integration/Clients/RepositoryCollaboratorClientTests.cs @@ -381,7 +381,7 @@ public async Task ReturnsNonePermissionForPrivateRepository() var fixture = github.Repository.Collaborator; var permission = await fixture.ReviewPermission(context.RepositoryOwner, context.RepositoryName, "octokitnet-test1"); - + Assert.Equal(PermissionLevel.None, permission.Permission); } } diff --git a/Octokit.Tests.Integration/Reactive/ObservableNotificationsClientTests.cs b/Octokit.Tests.Integration/Reactive/ObservableNotificationsClientTests.cs index e0e761fe4d..43d32e63b1 100644 --- a/Octokit.Tests.Integration/Reactive/ObservableNotificationsClientTests.cs +++ b/Octokit.Tests.Integration/Reactive/ObservableNotificationsClientTests.cs @@ -12,7 +12,7 @@ public class TheMarkAsReadMethod public async Task MarksNotificationsRead() { var client = new ObservableGitHubClient(Helper.GetAuthenticatedClient()); - + await client.Activity.Notifications.MarkAsRead(); } } diff --git a/Octokit.Tests.Integration/Reactive/ObservableProjectsClientTests.cs b/Octokit.Tests.Integration/Reactive/ObservableProjectsClientTests.cs index cdbfa6d4c2..c9fc202457 100644 --- a/Octokit.Tests.Integration/Reactive/ObservableProjectsClientTests.cs +++ b/Octokit.Tests.Integration/Reactive/ObservableProjectsClientTests.cs @@ -55,7 +55,7 @@ public async Task GetsAllFilteredProjectsForRepository() { var project1 = await CreateRepositoryProjectHelper(_github, _context.RepositoryId); var project2 = await CreateRepositoryProjectHelper(_github, _context.RepositoryId); - + // Make 2nd project closed var result = await _github.Repository.Project.Update(project2.Id, new ProjectUpdate { State = ItemState.Closed }); @@ -238,7 +238,7 @@ public async Task GetsAllProjects() public async Task GetsAllFilteredProjectsForRepository() { var project = await CreateOrganizationProjectHelper(_github, Helper.Organization); - + // Make project closed var result = await _github.Repository.Project.Update(project.Id, new ProjectUpdate { State = ItemState.Closed }); diff --git a/Octokit.Tests.Integration/Reactive/ObservableRepositoryCollaboratorClientTests.cs b/Octokit.Tests.Integration/Reactive/ObservableRepositoryCollaboratorClientTests.cs index a4ec881fd2..363e7465a8 100644 --- a/Octokit.Tests.Integration/Reactive/ObservableRepositoryCollaboratorClientTests.cs +++ b/Octokit.Tests.Integration/Reactive/ObservableRepositoryCollaboratorClientTests.cs @@ -141,7 +141,6 @@ public async Task ReturnsTrueIfUserIsCollaborator() } public class TheReviewPermissionMethod { - [IntegrationTest] public async Task ReturnsReadPermissionForNonCollaborator() { diff --git a/Octokit.Tests/Clients/OrganizationOutsideCollaboratorsClientTests.cs b/Octokit.Tests/Clients/OrganizationOutsideCollaboratorsClientTests.cs index 72ebc40a4b..beffb970be 100644 --- a/Octokit.Tests/Clients/OrganizationOutsideCollaboratorsClientTests.cs +++ b/Octokit.Tests/Clients/OrganizationOutsideCollaboratorsClientTests.cs @@ -138,8 +138,8 @@ public void RequestsTheCorrectUrl() client.Delete("org", "user"); connection.Connection.Received().Delete( - Arg.Is(u => u.ToString() == "orgs/org/outside_collaborators/user"), - Arg.Any(), + Arg.Is(u => u.ToString() == "orgs/org/outside_collaborators/user"), + Arg.Any(), "application/vnd.github.korra-preview+json"); } @@ -150,7 +150,7 @@ public async Task EnsuresNonNullArguments() await Assert.ThrowsAsync(() => client.Delete(null, "user")); await Assert.ThrowsAsync(() => client.Delete("org", null)); - + await Assert.ThrowsAsync(() => client.Delete("", "user")); await Assert.ThrowsAsync(() => client.Delete("org", "")); } diff --git a/Octokit.Tests/Clients/ProjectCardsClientTests.cs b/Octokit.Tests/Clients/ProjectCardsClientTests.cs index 06c6a7c104..e2edc82cad 100644 --- a/Octokit.Tests/Clients/ProjectCardsClientTests.cs +++ b/Octokit.Tests/Clients/ProjectCardsClientTests.cs @@ -75,7 +75,7 @@ public async Task PostsToCorrectURL() newCard, "application/vnd.github.inertia-preview+json"); } - + [Fact] public async Task EnsuresNonNullArguments() { @@ -151,7 +151,7 @@ public async Task PostsToCorrectURL() public async Task EnsuresNonNullArguments() { var client = new ProjectCardsClient(Substitute.For()); - + await Assert.ThrowsAsync(() => client.Move(1, null)); } } diff --git a/Octokit.Tests/Clients/ProjectsClientTests.cs b/Octokit.Tests/Clients/ProjectsClientTests.cs index 193b6b5e3f..f723667d92 100644 --- a/Octokit.Tests/Clients/ProjectsClientTests.cs +++ b/Octokit.Tests/Clients/ProjectsClientTests.cs @@ -249,7 +249,7 @@ public async Task PostsToCorrectURL() public async Task EnsuresNonNullArguments() { var client = new ProjectsClient(Substitute.For()); - + await Assert.ThrowsAsync(() => client.Update(1, null)); } } diff --git a/Octokit.Tests/Clients/PullRequestReviewRequestsClientTests.cs b/Octokit.Tests/Clients/PullRequestReviewRequestsClientTests.cs index 78c7ad934f..5e0000c82c 100644 --- a/Octokit.Tests/Clients/PullRequestReviewRequestsClientTests.cs +++ b/Octokit.Tests/Clients/PullRequestReviewRequestsClientTests.cs @@ -123,7 +123,7 @@ public void PostsToCorrectUrl() var connection = Substitute.For(); var client = new PullRequestReviewRequestsClient(connection); - IReadOnlyList fakeReviewers = new List { "zxc", "asd"}; + IReadOnlyList fakeReviewers = new List { "zxc", "asd" }; var pullRequestReviewRequest = new PullRequestReviewRequest(fakeReviewers); client.Create("fakeOwner", "fakeRepoName", 13, pullRequestReviewRequest); diff --git a/Octokit.Tests/Clients/PullRequestReviewsClientTests.cs b/Octokit.Tests/Clients/PullRequestReviewsClientTests.cs index ad82d10734..08921e5658 100644 --- a/Octokit.Tests/Clients/PullRequestReviewsClientTests.cs +++ b/Octokit.Tests/Clients/PullRequestReviewsClientTests.cs @@ -172,7 +172,7 @@ public void PostsToCorrectUrl() { var connection = Substitute.For(); var client = new PullRequestReviewsClient(connection); - + var comment = new DraftPullRequestReviewComment("Comment content", "file.css", 7); var review = new PullRequestReviewCreate() @@ -240,7 +240,7 @@ public async Task EnsuresNonNullArguments() await Assert.ThrowsAsync(() => client.Create("fakeOwner", "", 1, review)); } } - + public class TheDeleteMethod { [Fact] @@ -257,7 +257,6 @@ public async Task PostsToCorrectUrl() [Fact] public async Task PostsToCorrectUrlWithRepositoryId() { - var connection = Substitute.For(); var client = new PullRequestReviewsClient(connection); @@ -285,7 +284,6 @@ public class TheDismissMethod [Fact] public async Task PostsToCorrectUrl() { - var connection = Substitute.For(); var client = new PullRequestReviewsClient(connection); @@ -301,7 +299,6 @@ public async Task PostsToCorrectUrl() [Fact] public async Task PostsToCorrectUrlWithRepositoryId() { - var connection = Substitute.For(); var client = new PullRequestReviewsClient(connection); @@ -341,7 +338,7 @@ public async Task RequestsCorrectUrl() { var connection = Substitute.For(); var client = new PullRequestReviewsClient(connection); - + await client.GetAllComments("owner", "name", 13, 13); connection.Received().GetAll(Arg.Is(u => u.ToString() == "repos/owner/name/pulls/13/reviews/13/comments"), null, Args.ApiOptions); @@ -399,7 +396,7 @@ public async Task EnsuresNonNullArguments() { var connection = Substitute.For(); var client = new PullRequestReviewsClient(connection); - + await Assert.ThrowsAsync(() => client.GetAllComments(null, "name", 1, 1)); await Assert.ThrowsAsync(() => client.GetAllComments("owner", null, 1, 1)); @@ -418,7 +415,7 @@ public async Task PostsToCorrectUrl() var submitMessage = new PullRequestReviewSubmit() { - Body = "string", + Body = "string", Event = PullRequestReviewEvent.Approve }; await client.Submit("owner", "name", 13, 13, submitMessage); diff --git a/Octokit.Tests/Clients/RepoCollaboratorsClientTests.cs b/Octokit.Tests/Clients/RepoCollaboratorsClientTests.cs index c860810424..edd87c8944 100644 --- a/Octokit.Tests/Clients/RepoCollaboratorsClientTests.cs +++ b/Octokit.Tests/Clients/RepoCollaboratorsClientTests.cs @@ -201,7 +201,7 @@ public void RequestsCorrectUrl() client.ReviewPermission("owner", "test", "user1"); connection.Received().Get( Arg.Is(u => u.ToString() == "repos/owner/test/collaborators/user1/permission"), - Arg.Any>(), + Arg.Any>(), "application/vnd.github.korra-preview+json"); } @@ -214,7 +214,7 @@ public void RequestsCorrectUrlWithRepositoryId() client.ReviewPermission(1L, "user1"); connection.Received().Get( Arg.Is(u => u.ToString() == "repositories/1/collaborators/user1/permission"), - Arg.Any>(), + Arg.Any>(), "application/vnd.github.korra-preview+json"); } @@ -233,7 +233,6 @@ public async Task EnsuresNonNullArguments() await Assert.ThrowsAsync(() => client.ReviewPermission(1L, null)); await Assert.ThrowsAsync(() => client.ReviewPermission(1L, "")); } - } public class TheAddMethod diff --git a/Octokit.Tests/Helpers/UriExtensionsTests.cs b/Octokit.Tests/Helpers/UriExtensionsTests.cs index 0095b84d35..7effa276c5 100644 --- a/Octokit.Tests/Helpers/UriExtensionsTests.cs +++ b/Octokit.Tests/Helpers/UriExtensionsTests.cs @@ -92,7 +92,7 @@ public void CombinesExistingParametersWithNewParameters() var uri = new Uri("https://api.github.com/repositories/1/milestones?state=closed&sort=due_date&direction=asc&page=2"); var parameters = new Dictionary { { "state", "open" }, { "sort", "other" }, { "per_page", "5" } }; - + var actual = uri.ApplyParameters(parameters); Assert.Equal( @@ -106,7 +106,7 @@ public void CombinesExistingParametersWithNewParametersToRelativeUri() var uri = new Uri("repositories/1/milestones?state=closed&sort=due_date&direction=asc&page=2", UriKind.Relative); var parameters = new Dictionary { { "state", "open" }, { "sort", "other" }, { "per_page", "5" } }; - + var actual = uri.ApplyParameters(parameters); Assert.Equal( diff --git a/Octokit.Tests/Models/StringEnumTests.cs b/Octokit.Tests/Models/StringEnumTests.cs index 4ae61bde7a..a19f435f9f 100644 --- a/Octokit.Tests/Models/StringEnumTests.cs +++ b/Octokit.Tests/Models/StringEnumTests.cs @@ -38,7 +38,7 @@ public void ShouldRespectCustomPropertyAttributes() [Fact] public void ShouldThrowForInvalidEnumValue() { - Assert.Throws(() => new StringEnum((AccountType) 1337)); + Assert.Throws(() => new StringEnum((AccountType)1337)); } } @@ -134,7 +134,7 @@ public void ShouldSetValueAndParsedValue() public void ShouldThrowForInvalidEnumValue() { StringEnum stringEnum; - Assert.Throws(() => stringEnum = (AccountType) 1337); + Assert.Throws(() => stringEnum = (AccountType)1337); } } diff --git a/Octokit.Tests/Reactive/ObservableOrganizationOutsideCollaboratorsClientTests.cs b/Octokit.Tests/Reactive/ObservableOrganizationOutsideCollaboratorsClientTests.cs index 6b1cff7343..31a9eeca5c 100644 --- a/Octokit.Tests/Reactive/ObservableOrganizationOutsideCollaboratorsClientTests.cs +++ b/Octokit.Tests/Reactive/ObservableOrganizationOutsideCollaboratorsClientTests.cs @@ -51,8 +51,8 @@ public void RequestsTheCorrectUrlWithApiOptions() client.GetAll("org", options); gitHubClient.Connection.Received(1).Get>( - Arg.Is(u => u.ToString() == "orgs/org/outside_collaborators"), - Arg.Is>(d => d.Count == 2), + Arg.Is(u => u.ToString() == "orgs/org/outside_collaborators"), + Arg.Is>(d => d.Count == 2), "application/vnd.github.korra-preview+json"); } @@ -86,8 +86,8 @@ public void AllFilterRequestsTheCorrectUrl() client.GetAll("org", OrganizationMembersFilter.All); gitHubClient.Connection.Received(1).Get>( - Arg.Is(u => u.ToString() == "orgs/org/outside_collaborators?filter=all"), - Args.EmptyDictionary, + Arg.Is(u => u.ToString() == "orgs/org/outside_collaborators?filter=all"), + Args.EmptyDictionary, "application/vnd.github.korra-preview+json"); } @@ -107,8 +107,8 @@ public void AllFilterRequestsTheCorrectUrlWithApiOptions() client.GetAll("org", OrganizationMembersFilter.All, options); gitHubClient.Connection.Received(1).Get>( - Arg.Is(u => u.ToString() == "orgs/org/outside_collaborators?filter=all"), - Arg.Is>(d => d.Count == 2), + Arg.Is(u => u.ToString() == "orgs/org/outside_collaborators?filter=all"), + Arg.Is>(d => d.Count == 2), "application/vnd.github.korra-preview+json"); } @@ -121,8 +121,8 @@ public void TwoFactorFilterRequestsTheCorrectUrl() client.GetAll("org", OrganizationMembersFilter.TwoFactorAuthenticationDisabled); gitHubClient.Connection.Received(1).Get>( - Arg.Is(u => u.ToString() == "orgs/org/outside_collaborators?filter=2fa_disabled"), - Args.EmptyDictionary, + Arg.Is(u => u.ToString() == "orgs/org/outside_collaborators?filter=2fa_disabled"), + Args.EmptyDictionary, "application/vnd.github.korra-preview+json"); } @@ -142,8 +142,8 @@ public void TwoFactorFilterRequestsTheCorrectUrlWithApiOptions() client.GetAll("org", OrganizationMembersFilter.TwoFactorAuthenticationDisabled, options); gitHubClient.Connection.Received(1).Get>( - Arg.Is(u => u.ToString() == "orgs/org/outside_collaborators?filter=2fa_disabled"), - Arg.Is>(d => d.Count == 2), + Arg.Is(u => u.ToString() == "orgs/org/outside_collaborators?filter=2fa_disabled"), + Arg.Is>(d => d.Count == 2), "application/vnd.github.korra-preview+json"); } } diff --git a/Octokit.Tests/Reactive/ObservableProjectsClientTests.cs b/Octokit.Tests/Reactive/ObservableProjectsClientTests.cs index cf7fdf69ab..d2cdad7785 100644 --- a/Octokit.Tests/Reactive/ObservableProjectsClientTests.cs +++ b/Octokit.Tests/Reactive/ObservableProjectsClientTests.cs @@ -185,7 +185,7 @@ public void RequestCorrectURL() client.Get(1); gitHubClient.Repository.Project.Received().Get(1); - } + } } public class TheCreateForRepositoryMethod @@ -200,7 +200,7 @@ public void PostsToCorrectURL() client.CreateForRepository(1, newProject); gitHubClient.Repository.Project.Received().CreateForRepository(1, newProject); - } + } [Fact] public async Task EnsuresNonNullArguments() @@ -250,7 +250,7 @@ public void PostsToCorrectURL() client.Update(1, updateProject); gitHubClient.Repository.Project.Received().Update(1, updateProject); - } + } [Fact] public async Task EnsuresNonNullArguments() @@ -273,7 +273,7 @@ public void DeletesCorrectUrl() client.Delete(1); gitHubClient.Repository.Project.Received().Delete(1); - } + } } } } diff --git a/Octokit.Tests/Reactive/ObservablePullRequestReviewsClientTests.cs b/Octokit.Tests/Reactive/ObservablePullRequestReviewsClientTests.cs index 8f327776e4..0b3c7267f5 100644 --- a/Octokit.Tests/Reactive/ObservablePullRequestReviewsClientTests.cs +++ b/Octokit.Tests/Reactive/ObservablePullRequestReviewsClientTests.cs @@ -91,7 +91,6 @@ public void RequestsCorrectUrlWithApiOptionsWithRepositoryId() [Fact] public async Task RequestsCorrectUrlMulti() { - var firstPageUrl = new Uri("repos/owner/name/pulls/7/reviews", UriKind.Relative); var secondPageUrl = new Uri("https://example.com/page/2"); var firstPageLinks = new Dictionary { { "next", secondPageUrl } }; @@ -219,7 +218,6 @@ public async Task EnsuresNonNullArguments() Assert.Throws(() => client.GetAll("", "name", 1, ApiOptions.None)); Assert.Throws(() => client.GetAll("owner", "", 1, ApiOptions.None)); - } } @@ -254,7 +252,7 @@ public async Task EnsuresNonNullArguments() Assert.Throws(() => client.Get(null, "name", 1, 1)); Assert.Throws(() => client.Get("owner", null, 1, 1)); - + Assert.Throws(() => client.Get("", "name", 1, 1)); Assert.Throws(() => client.Get("owner", "", 1, 1)); } @@ -365,7 +363,7 @@ public void EnsuresNonNullArguments() Assert.Throws(() => client.Delete(null, "name", 1, 1)); Assert.Throws(() => client.Delete("owner", null, 1, 1)); - + Assert.Throws(() => client.Delete("", "name", 1, 1)); Assert.Throws(() => client.Delete("owner", "", 1, 1)); } @@ -584,7 +582,7 @@ public async Task RequestsCorrectUrlMultiWithRepositoryId() .Returns(Task.Factory.StartNew>>(() => secondPageResponse)); gitHubClient.Connection.Get>(thirdPageUrl, Args.EmptyDictionary, null) .Returns(Task.Factory.StartNew>>(() => lastPageResponse)); - + var client = new ObservablePullRequestReviewsClient(gitHubClient); var results = await client.GetAllComments(1, 7, 1).ToArray(); @@ -615,7 +613,6 @@ public async Task EnsuresNonNullArguments() Assert.Throws(() => client.GetAllComments("", "name", 1, 1, ApiOptions.None)); Assert.Throws(() => client.GetAllComments("owner", "", 1, 1, ApiOptions.None)); - } } diff --git a/Octokit/Clients/IProjectCardsClient.cs b/Octokit/Clients/IProjectCardsClient.cs index a54e5a745d..c33831c34c 100644 --- a/Octokit/Clients/IProjectCardsClient.cs +++ b/Octokit/Clients/IProjectCardsClient.cs @@ -12,7 +12,6 @@ namespace Octokit /// public interface IProjectCardsClient { - /// /// Gets all cards. /// diff --git a/Octokit/Clients/ProjectColumnsClient.cs b/Octokit/Clients/ProjectColumnsClient.cs index 66453492bb..3b3015404e 100644 --- a/Octokit/Clients/ProjectColumnsClient.cs +++ b/Octokit/Clients/ProjectColumnsClient.cs @@ -40,7 +40,7 @@ public Task> GetAll(int projectId) public Task> GetAll(int projectId, ApiOptions options) { Ensure.ArgumentNotNull(options, "options"); - + return ApiConnection.GetAll(ApiUrls.ProjectColumns(projectId), new Dictionary(), AcceptHeaders.ProjectsApiPreview, options); } @@ -105,7 +105,7 @@ public async Task Delete(int id) { return false; } - } + } /// /// Moves a column. diff --git a/Octokit/Clients/ProjectsClient.cs b/Octokit/Clients/ProjectsClient.cs index 4bd50ec643..630f987f60 100644 --- a/Octokit/Clients/ProjectsClient.cs +++ b/Octokit/Clients/ProjectsClient.cs @@ -246,7 +246,7 @@ public Task CreateForOrganization(string organization, NewProject newPr return ApiConnection.Post(ApiUrls.OrganizationProjects(organization), newProject, AcceptHeaders.ProjectsApiPreview); } - + /// /// Updates a project for this repository. /// @@ -261,7 +261,7 @@ public Task Update(int id, ProjectUpdate projectUpdate) return ApiConnection.Patch(ApiUrls.Project(id), projectUpdate, AcceptHeaders.ProjectsApiPreview); } - + /// /// Deletes a project. /// diff --git a/Octokit/Clients/PullRequestReviewsClient.cs b/Octokit/Clients/PullRequestReviewsClient.cs index de41bdb649..79a92742b9 100644 --- a/Octokit/Clients/PullRequestReviewsClient.cs +++ b/Octokit/Clients/PullRequestReviewsClient.cs @@ -30,7 +30,7 @@ public Task> GetAll(string owner, string name, Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); - return GetAll(owner, name, number, ApiOptions.None); + return GetAll(owner, name, number, ApiOptions.None); } /// diff --git a/Octokit/Clients/RepoCollaboratorsClient.cs b/Octokit/Clients/RepoCollaboratorsClient.cs index 9b7538dc9c..a355e51471 100644 --- a/Octokit/Clients/RepoCollaboratorsClient.cs +++ b/Octokit/Clients/RepoCollaboratorsClient.cs @@ -172,7 +172,7 @@ public Task ReviewPermission(long repositoryId, string u return ApiConnection .Get(ApiUrls.RepoCollaboratorPermission(repositoryId, user), null, AcceptHeaders.OrganizationMembershipPreview); } - + /// /// Adds a new collaborator to the repository. /// @@ -210,7 +210,7 @@ public async Task Add(string owner, string name, string user, Collaborator Ensure.ArgumentNotNullOrEmptyString(user, "user"); try - { + { var response = await Connection.Put(ApiUrls.RepoCollaborator(owner, name, user), permission).ConfigureAwait(false); return response.HttpResponse.IsTrue(); } diff --git a/Octokit/Clients/RepositoryBranchesClient.cs b/Octokit/Clients/RepositoryBranchesClient.cs index 2c1ad4c059..e1ae57521d 100644 --- a/Octokit/Clients/RepositoryBranchesClient.cs +++ b/Octokit/Clients/RepositoryBranchesClient.cs @@ -536,7 +536,6 @@ public Task GetAdminEnforcement(long repositoryId, string branch) Ensure.ArgumentNotNullOrEmptyString(branch, "branch"); return ApiConnection.Get(ApiUrls.RepoProtectedBranchAdminEnforcement(repositoryId, branch), null, AcceptHeaders.ProtectedBranchesApiPreview); - } /// diff --git a/Octokit/Exceptions/UserIsLastOwnerOfOrganizationException.cs b/Octokit/Exceptions/UserIsLastOwnerOfOrganizationException.cs index 84dc47c776..9435b21e8f 100644 --- a/Octokit/Exceptions/UserIsLastOwnerOfOrganizationException.cs +++ b/Octokit/Exceptions/UserIsLastOwnerOfOrganizationException.cs @@ -32,7 +32,7 @@ public UserIsLastOwnerOfOrganizationException(IResponse response) : this(respons /// /// The HTTP payload from the server /// The inner exception - public UserIsLastOwnerOfOrganizationException(IResponse response, ApiException innerException) + public UserIsLastOwnerOfOrganizationException(IResponse response, ApiException innerException) : base(response, innerException) { Debug.Assert(response != null && response.StatusCode == HttpStatusCode.Forbidden, diff --git a/Octokit/Exceptions/UserIsNotMemberOfOrganizationException.cs b/Octokit/Exceptions/UserIsNotMemberOfOrganizationException.cs index 5d5f53eb2e..05976c6260 100644 --- a/Octokit/Exceptions/UserIsNotMemberOfOrganizationException.cs +++ b/Octokit/Exceptions/UserIsNotMemberOfOrganizationException.cs @@ -32,7 +32,7 @@ public UserIsNotMemberOfOrganizationException(IResponse response) : this(respons /// /// The HTTP payload from the server /// The inner exception - public UserIsNotMemberOfOrganizationException(IResponse response, ApiException innerException) + public UserIsNotMemberOfOrganizationException(IResponse response, ApiException innerException) : base(response, innerException) { Debug.Assert(response != null && response.StatusCode == HttpStatusCode.NotFound, diff --git a/Octokit/Exceptions/UserIsOrganizationMemberException.cs b/Octokit/Exceptions/UserIsOrganizationMemberException.cs index 7b79c0597d..06120d9044 100644 --- a/Octokit/Exceptions/UserIsOrganizationMemberException.cs +++ b/Octokit/Exceptions/UserIsOrganizationMemberException.cs @@ -32,7 +32,7 @@ public UserIsOrganizationMemberException(IResponse response) : this(response, nu /// /// The HTTP payload from the server /// The inner exception - public UserIsOrganizationMemberException(IResponse response, ApiException innerException) + public UserIsOrganizationMemberException(IResponse response, ApiException innerException) : base(response, innerException) { Debug.Assert(response != null && response.StatusCode == (HttpStatusCode)422, diff --git a/Octokit/GitHubClient.cs b/Octokit/GitHubClient.cs index cf86a5c659..a00614c4f5 100644 --- a/Octokit/GitHubClient.cs +++ b/Octokit/GitHubClient.cs @@ -205,7 +205,7 @@ public Uri BaseAddress /// Refer to the API documentation for more information: https://developer.github.com/v3/pulls/ /// public IPullRequestsClient PullRequest { get; private set; } - + /// /// Access GitHub's Repositories API. /// diff --git a/Octokit/Helpers/AcceptHeaders.cs b/Octokit/Helpers/AcceptHeaders.cs index d2360c63d8..ffe354941e 100644 --- a/Octokit/Helpers/AcceptHeaders.cs +++ b/Octokit/Helpers/AcceptHeaders.cs @@ -48,6 +48,5 @@ public static class AcceptHeaders public const string ProjectsApiPreview = "application/vnd.github.inertia-preview+json"; public const string OrganizationMembershipPreview = "application/vnd.github.korra-preview+json"; - } } diff --git a/Octokit/Models/Request/PullRequestReviewCreate.cs b/Octokit/Models/Request/PullRequestReviewCreate.cs index 47960bc49e..42e2e14556 100644 --- a/Octokit/Models/Request/PullRequestReviewCreate.cs +++ b/Octokit/Models/Request/PullRequestReviewCreate.cs @@ -35,7 +35,7 @@ public PullRequestReviewCreate() /// List of comments to include with this review /// public List Comments { get; set; } - + internal string DebuggerDisplay { get diff --git a/Octokit/Models/Request/PullRequestReviewSubmit.cs b/Octokit/Models/Request/PullRequestReviewSubmit.cs index b673e3ae90..99a136a61b 100644 --- a/Octokit/Models/Request/PullRequestReviewSubmit.cs +++ b/Octokit/Models/Request/PullRequestReviewSubmit.cs @@ -14,7 +14,7 @@ public class PullRequestReviewSubmit : RequestParameters public PullRequestReviewSubmit() { } - + /// /// The body of the review message /// @@ -24,7 +24,7 @@ public PullRequestReviewSubmit() /// The review event - Approve, Request Changes, Comment /// public PullRequestReviewEvent Event { get; set; } - + internal string DebuggerDisplay { get diff --git a/Octokit/Models/Request/RepositoryUpdate.cs b/Octokit/Models/Request/RepositoryUpdate.cs index 498eb16df4..75a7cc9e59 100644 --- a/Octokit/Models/Request/RepositoryUpdate.cs +++ b/Octokit/Models/Request/RepositoryUpdate.cs @@ -12,7 +12,6 @@ namespace Octokit [DebuggerDisplay("{DebuggerDisplay,nq}")] public class RepositoryUpdate { - /// /// Creates an object that describes an update to a repository on GitHub. /// diff --git a/Octokit/Models/Response/PullRequestReview.cs b/Octokit/Models/Response/PullRequestReview.cs index 8a8cd1970f..49180be48f 100644 --- a/Octokit/Models/Response/PullRequestReview.cs +++ b/Octokit/Models/Response/PullRequestReview.cs @@ -15,7 +15,7 @@ public PullRequestReview(long id) Id = id; } - public PullRequestReview(long id, string commitId, User user, string body, string htmlUrl, string pullRequestUrl, PullRequestReviewState state) + public PullRequestReview(long id, string commitId, User user, string body, string htmlUrl, string pullRequestUrl, PullRequestReviewState state) { Id = id; CommitId = commitId; @@ -25,7 +25,7 @@ public PullRequestReview(long id, string commitId, User user, string body, stri PullRequestUrl = pullRequestUrl; State = state; } - + /// /// The review Id. /// @@ -40,7 +40,7 @@ public PullRequestReview(long id, string commitId, User user, string body, stri /// The commit Id the review is associated with. /// public string CommitId { get; protected set; } - + /// /// The user that created the review. /// @@ -50,7 +50,7 @@ public PullRequestReview(long id, string commitId, User user, string body, stri /// The text of the review. /// public string Body { get; protected set; } - + /// /// The URL for this review on Github.com /// @@ -60,7 +60,7 @@ public PullRequestReview(long id, string commitId, User user, string body, stri /// The URL for the pull request via the API. /// public string PullRequestUrl { get; protected set; } - + internal string DebuggerDisplay { get { return string.Format(CultureInfo.InvariantCulture, "Id: {0}, State: {1}, User: {2}", Id, State.DebuggerDisplay, User.DebuggerDisplay); } @@ -71,7 +71,7 @@ public enum PullRequestReviewState { [Parameter(Value = "APPROVED")] Approved, - + [Parameter(Value = "CHANGES_REQUESTED")] ChangesRequested, diff --git a/Octokit/Models/Response/StringEnum.cs b/Octokit/Models/Response/StringEnum.cs index d928e686f1..521fab7b5f 100644 --- a/Octokit/Models/Response/StringEnum.cs +++ b/Octokit/Models/Response/StringEnum.cs @@ -109,7 +109,7 @@ public override bool Equals(object obj) return false; } - return obj is StringEnum && Equals((StringEnum) obj); + return obj is StringEnum && Equals((StringEnum)obj); } public override int GetHashCode() diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 26f3ad556b..66454fcc68 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -1,3 +1,78 @@ +### New in 0.25.0 (released 23/8/2017) + +## Advisories and Breaking Changes + +- Octokit.net has been ported to dotnetcore :tada: providing libraries targetting `netstandard1.1` and `net45` frameworks + +- `Enum` fields in Octokit response classes are now wrapped in an `StringEnum` helper class, to provide more robustness in dealing with unknown API values for these fields. Whilst the changes are backwards compatible, please consult the guidance on [working with Enums](https://github.com/octokit/octokit.net/blob/master/docs/working-with-enums.md) for more information + +- `IncludeAdmins` field is no longer present in `BranchProtectionRequiredStatusChecks` and `BranchProtectionRequiredStatusChecksUpdate` classes, instead use the new `EnforceAdmins` field on `BranchProtectionSettingsUpdate` or the [new explicit methods](https://github.com/octokit/octokit.net/blob/master/Octokit/Clients/IRepositoryBranchesClient.cs#L304-L365) for configuring Admin Enforcement on protected branches. This was an [upstream API breaking change](https://developer.github.com/changes/2017-05-02-adoption-of-admin-enforced/) so we couldn't follow our normal deprecation schedule + +## Release Notes + +### Milestone: CAKE Builds + +**Features/Enhancements** + +- Add a build task to validate LINQPad samples - [#1551](https://github.com/octokit/octokit.net/pull/1551) via [@mderriey](https://github.com/mderriey) +- Add a code formatting task to CAKE - [#1550](https://github.com/octokit/octokit.net/pull/1550) via [@mderriey](https://github.com/mderriey) +- Add GitVersion configuration file - [#1555](https://github.com/octokit/octokit.net/pull/1555) via [@mderriey](https://github.com/mderriey) + + +### Milestone: dotnetcore Support + +**Features/Enhancements** + +- Port to .NET Core - [#1503](https://github.com/octokit/octokit.net/pull/1503) via [@mderriey](https://github.com/mderriey), [@ryangribble](https://github.com/ryangribble) +- Remove unneeded files for .NET Core - [#1549](https://github.com/octokit/octokit.net/pull/1549) via [@mderriey](https://github.com/mderriey) +- Migrate dotnetcore to vs2017 tooling - [#1567](https://github.com/octokit/octokit.net/pull/1567) via [@ryangribble](https://github.com/ryangribble), [@mderriey](https://github.com/mderriey) +- Provide [SourceLink](https://github.com/ctaggart/SourceLink) capability for Octokit and Octokit.Reactive assemblies - [#1574](https://github.com/octokit/octokit.net/pull/1574) via [@ryangribble](https://github.com/ryangribble), [@mderriey](https://github.com/mderriey) +- Deliver the dotnetcore port and CAKE build framework changes - [#1581](https://github.com/octokit/octokit.net/pull/1581) via [@ryangribble](https://github.com/ryangribble), [@mderriey](https://github.com/mderriey) + +**Fixes** + +- Fix broken JSON deserialization in .NET 4.5 after VS2017 project update - [#1647](https://github.com/octokit/octokit.net/pull/1647) via [@mderriey](https://github.com/mderriey) + + +### Milestone: None + +**Features/Enhancements** + +- Add support for the newly resurrected `PullRequest.MergeCommitSha` property - [#1562](https://github.com/octokit/octokit.net/pull/1562) via [@alexperovich](https://github.com/alexperovich) +- Enhance `RepositoryBranchesClient` to support Admin Enforcement changes - [#1598](https://github.com/octokit/octokit.net/pull/1598) via [@M-Zuber](https://github.com/M-Zuber) +- Implement [Pull Request Review Requests API (Preview)](https://developer.github.com/v3/pulls/review_requests/) - [#1588](https://github.com/octokit/octokit.net/pull/1588) via [@gdziadkiewicz](https://github.com/gdziadkiewicz), [@ryangribble](https://github.com/ryangribble) +- Provide a robust way to handle unknown enum values returned by GitHub API, to prevent deserialization errors until the enum values can be added to octokit - [#1595](https://github.com/octokit/octokit.net/pull/1595) via [@khellang](https://github.com/khellang), [@ryangribble](https://github.com/ryangribble) +- Implement [Projects API (Preview)](https://developer.github.com/v3/projects/) - [#1480](https://github.com/octokit/octokit.net/pull/1480) via [@maddin2016](https://github.com/maddin2016), [@ryangribble](https://github.com/ryangribble) +- Implement `ReviewPermission()` functionality for `OrganizationMembersClient` (Preview API) - [#1633](https://github.com/octokit/octokit.net/pull/1633) via [@alfhenrik](https://github.com/alfhenrik) +- Implement [Organization OutsideCollaborators API (Preview)](https://developer.github.com/v3/orgs/outside_collaborators/) - [#1639](https://github.com/octokit/octokit.net/pull/1639) via [@alfhenrik](https://github.com/alfhenrik), [@ryangribble](https://github.com/ryangribble) +- Implement pagination support for `OrganizationOutsideCollaboratorsClient.GetAll()` method - [#1650](https://github.com/octokit/octokit.net/pull/1650) via [@ryangribble](https://github.com/ryangribble) +- Implement `GetAllPendingInvitations()` functionality for `OrganizationMembersClient` and `TeamsClient` (Preview API) - [#1640](https://github.com/octokit/octokit.net/pull/1640) via [@alfhenrik](https://github.com/alfhenrik), [@ryangribble](https://github.com/ryangribble) +- Implement [Pull Request Reviews API](https://developer.github.com/v3/pulls/reviews/) - [#1648](https://github.com/octokit/octokit.net/pull/1648) via [@hartra344](https://github.com/hartra344), [@ryangribble](https://github.com/ryangribble) + +**Fixes** + +- Fix `RepositoryTrafficClient` to handle upstream API change in timestamps from Unix epoch time to ISO8601 - [#1560](https://github.com/octokit/octokit.net/pull/1560) via [@mderriey](https://github.com/mderriey), [@ryangribble](https://github.com/ryangribble) +- Fix more `IssueTimelineClient` deserialization exceptions by adding more new `EventInfoState` values - [#1563](https://github.com/octokit/octokit.net/pull/1563) via [@ryangribble](https://github.com/ryangribble) +- Fix `NotificationsClient.MarkAsRead()` exception by specifying a payload body in the `PUT` request - [#1579](https://github.com/octokit/octokit.net/pull/1579) via [@shiftkey](https://github.com/shiftkey), [@ryangribble](https://github.com/ryangribble) +- Fix `connection.GetLastApiInfo()` was returning `null` in some situations - [#1580](https://github.com/octokit/octokit.net/pull/1580) via [@ryangribble](https://github.com/ryangribble) +- Fix even more `IssueTimelineClient` deserialization exceptions by adding even more new `EventInfoState` values (this is getting old!) - [#1591](https://github.com/octokit/octokit.net/pull/1591) via [@lynnfaraday](https://github.com/lynnfaraday), [@ryangribble](https://github.com/ryangribble) +- `NewRepositoryWebHook.ToRequest()` no longer discards existing fields if they are set - [#1623](https://github.com/octokit/octokit.net/pull/1623) via [@ctolkien](https://github.com/ctolkien) +- Fix pagination on API calls that use `Uri` parameters (typically for requests that include some form of filtering) - [#1649](https://github.com/octokit/octokit.net/pull/1649) via [@ryangribble](https://github.com/ryangribble) +- Fixed `RepositoryCommitsClient.GetSha1()` to correctly obtain the sha1 of the specified commit, after the API went from preview to official - [#1654](https://github.com/octokit/octokit.net/pull/1654) via [@ryangribble](https://github.com/ryangribble) + +**Housekeeping** + +- Remove obsolete constructor of `RepositoryUpdate` request class - [#1569](https://github.com/octokit/octokit.net/pull/1569) via [@eriawan](https://github.com/eriawan) +- Remove unused Rx-Main dependency from LINQPad samples - [#1593](https://github.com/octokit/octokit.net/pull/1593) via [@NickCraver](https://github.com/NickCraver) +- Change response models 'Url' properties from `Uri` to `string` - [#1585](https://github.com/octokit/octokit.net/pull/1585) via [@mderriey](https://github.com/mderriey) +- Remove obsolete branch protection methods/classes - [#1620](https://github.com/octokit/octokit.net/pull/1620) via [@ryangribble](https://github.com/ryangribble) +- Remove methods and members that were marked `[Obsolete]` in 0.23 or earlier - [#1622](https://github.com/octokit/octokit.net/pull/1622) via [@ryangribble](https://github.com/ryangribble) + +**Documentation Updates** + +- Fix `Issue` documentation samples (`GetForRepository()` should be `GetForRepository()`) - [#1602](https://github.com/octokit/octokit.net/pull/1602) via [@tnaoto](https://github.com/tnaoto) +- Fix `Release` documentation samples (`ReleaseUpdate` should be `NewRelease`) - [#1611](https://github.com/octokit/octokit.net/pull/1611) via [@watsonlu](https://github.com/watsonlu) + ### New in 0.24.0 (released 17/1/2017) **Features/Enhancements**