diff --git a/.travis.yml b/.travis.yml index d9f978c4..d76efdb6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,10 +5,14 @@ matrix: - os: linux dist: trusty sudo: required - dotnet: 2.0.3 + dotnet: 2.1.300 - os: osx osx_image: xcode8.3 - dotnet: 2.0.3 + dotnet: 2.1.300 + +branches: + only: + - "master" before_script: - if test "$TRAVIS_OS_NAME" == "osx"; then export FrameworkPathOverride=/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/4.5/; else export FrameworkPathOverride=/usr/lib/mono/4.5/; fi diff --git a/Octokit.Tests.Integration/Clients/Enterprise/EnterprisePreReceiveEnvironmentsClientTests.cs b/Octokit.Tests.Integration/Clients/Enterprise/EnterprisePreReceiveEnvironmentsClientTests.cs index 211ee905..92e20221 100644 --- a/Octokit.Tests.Integration/Clients/Enterprise/EnterprisePreReceiveEnvironmentsClientTests.cs +++ b/Octokit.Tests.Integration/Clients/Enterprise/EnterprisePreReceiveEnvironmentsClientTests.cs @@ -164,7 +164,7 @@ public class EnterprisePreReceiveEnvironmentsClientTests _preReceiveEnvironmentsClient = _githubEnterprise.Enterprise.PreReceiveEnvironment; } - [Fact] + [GitHubEnterpriseTest] public async Task CanCreatePreReceiveEnvironment() { PreReceiveEnvironment preReceiveEnvironment = null; @@ -185,7 +185,7 @@ public class EnterprisePreReceiveEnvironmentsClientTests } } - [Fact] + [GitHubEnterpriseTest] public async Task CannotCreateWithSameName() { var newPreReceiveEnvironment = new NewPreReceiveEnvironment("default", "https://example.com/foo.zip"); diff --git a/Octokit.Tests.Integration/Clients/GitHubAppsClientTests.cs b/Octokit.Tests.Integration/Clients/GitHubAppsClientTests.cs index 79113bed..c62e6547 100644 --- a/Octokit.Tests.Integration/Clients/GitHubAppsClientTests.cs +++ b/Octokit.Tests.Integration/Clients/GitHubAppsClientTests.cs @@ -92,7 +92,7 @@ namespace Octokit.Tests.Integration.Clients public async Task GetsInstallation() { var installationId = Helper.GitHubAppInstallationId; - + var result = await _github.GitHubApps.GetInstallation(installationId); Assert.True(result.AppId == Helper.GitHubAppId); diff --git a/Octokit.Tests.Integration/Clients/SearchClientTests.cs b/Octokit.Tests.Integration/Clients/SearchClientTests.cs index 303fdfe0..a4104878 100644 --- a/Octokit.Tests.Integration/Clients/SearchClientTests.cs +++ b/Octokit.Tests.Integration/Clients/SearchClientTests.cs @@ -621,7 +621,7 @@ public class SearchClientTests public async Task SearchForAllLabelsUsingTermAndRepositoryId() { var request = new SearchLabelsRequest("category", 7528679); - + var labels = await _gitHubClient.Search.SearchLabels(request); Assert.NotEmpty(labels.Items); diff --git a/Octokit.Tests.Integration/Helper.cs b/Octokit.Tests.Integration/Helper.cs index 15953eb6..32b67b41 100644 --- a/Octokit.Tests.Integration/Helper.cs +++ b/Octokit.Tests.Integration/Helper.cs @@ -89,7 +89,7 @@ namespace Octokit.Tests.Integration // return null, which will cause the [GitHubAppTest]'s to not be discovered return null; #endif - + }); static readonly Lazy _customUrl = new Lazy(() => diff --git a/Octokit.Tests.Integration/Reactive/Enterprise/ObservableEnterprisePreReceiveEnvironmentsClientTests.cs b/Octokit.Tests.Integration/Reactive/Enterprise/ObservableEnterprisePreReceiveEnvironmentsClientTests.cs index 22e05fa1..cb08ac8a 100644 --- a/Octokit.Tests.Integration/Reactive/Enterprise/ObservableEnterprisePreReceiveEnvironmentsClientTests.cs +++ b/Octokit.Tests.Integration/Reactive/Enterprise/ObservableEnterprisePreReceiveEnvironmentsClientTests.cs @@ -166,7 +166,7 @@ public class ObservableEnterprisePreReceiveEnvironmentsClientTests _preReceiveEnvironmentsClient = _githubEnterprise.Enterprise.PreReceiveEnvironment; } - [Fact] + [GitHubEnterpriseTest] public async Task CanCreatePreReceiveEnvironment() { PreReceiveEnvironment preReceiveEnvironment = null; @@ -187,7 +187,7 @@ public class ObservableEnterprisePreReceiveEnvironmentsClientTests } } - [Fact] + [GitHubEnterpriseTest] public async Task CannotCreateWithSameName() { var newPreReceiveEnvironment = new NewPreReceiveEnvironment("default", "https://example.com/foo.zip"); diff --git a/Octokit.Tests.Integration/Reactive/ObservableReleaseClientTests.cs b/Octokit.Tests.Integration/Reactive/ObservableReleaseClientTests.cs index c706704b..c5349c85 100644 --- a/Octokit.Tests.Integration/Reactive/ObservableReleaseClientTests.cs +++ b/Octokit.Tests.Integration/Reactive/ObservableReleaseClientTests.cs @@ -88,7 +88,7 @@ namespace Octokit.Tests.Integration.Reactive public class TheGetMethod { readonly ObservableReleasesClient _releaseClient; - + public TheGetMethod() { var github = Helper.GetAuthenticatedClient(); diff --git a/Octokit.Tests/Clients/RepositoryBranchesClientTests.cs b/Octokit.Tests/Clients/RepositoryBranchesClientTests.cs index 3243d694..28f04153 100644 --- a/Octokit.Tests/Clients/RepositoryBranchesClientTests.cs +++ b/Octokit.Tests/Clients/RepositoryBranchesClientTests.cs @@ -1042,7 +1042,7 @@ namespace Octokit.Tests.Clients connection.Received() .Get>( - Arg.Is(u => u.ToString() == "repos/owner/repo/branches/branch/protection/restrictions/teams"), + Arg.Is(u => u.ToString() == "repos/owner/repo/branches/branch/protection/restrictions/teams"), null, "application/vnd.github.loki-preview+json,application/vnd.github.hellcat-preview+json"); } @@ -1057,7 +1057,7 @@ namespace Octokit.Tests.Clients connection.Received() .Get>( - Arg.Is(u => u.ToString() == "repositories/1/branches/branch/protection/restrictions/teams"), + Arg.Is(u => u.ToString() == "repositories/1/branches/branch/protection/restrictions/teams"), null, "application/vnd.github.loki-preview+json,application/vnd.github.hellcat-preview+json"); } @@ -1094,8 +1094,8 @@ namespace Octokit.Tests.Clients connection.Received() .Put>( - Arg.Is(u => u.ToString() == "repos/owner/repo/branches/branch/protection/restrictions/teams"), - Arg.Any>(), + Arg.Is(u => u.ToString() == "repos/owner/repo/branches/branch/protection/restrictions/teams"), + Arg.Any>(), null, "application/vnd.github.loki-preview+json,application/vnd.github.hellcat-preview+json"); } @@ -1111,8 +1111,8 @@ namespace Octokit.Tests.Clients connection.Received() .Put>( - Arg.Is(u => u.ToString() == "repositories/1/branches/branch/protection/restrictions/teams"), - Arg.Any>(), + Arg.Is(u => u.ToString() == "repositories/1/branches/branch/protection/restrictions/teams"), + Arg.Any>(), null, "application/vnd.github.loki-preview+json,application/vnd.github.hellcat-preview+json"); } @@ -1152,7 +1152,7 @@ namespace Octokit.Tests.Clients connection.Received() .Post>( - Arg.Is(u => u.ToString() == "repos/owner/repo/branches/branch/protection/restrictions/teams"), + Arg.Is(u => u.ToString() == "repos/owner/repo/branches/branch/protection/restrictions/teams"), Arg.Any>(), "application/vnd.github.loki-preview+json,application/vnd.github.hellcat-preview+json"); } @@ -1168,7 +1168,7 @@ namespace Octokit.Tests.Clients connection.Received() .Post>( - Arg.Is(u => u.ToString() == "repositories/1/branches/branch/protection/restrictions/teams"), + Arg.Is(u => u.ToString() == "repositories/1/branches/branch/protection/restrictions/teams"), Arg.Any>(), "application/vnd.github.loki-preview+json,application/vnd.github.hellcat-preview+json"); } @@ -1208,7 +1208,7 @@ namespace Octokit.Tests.Clients connection.Received() .Delete>( - Arg.Is(u => u.ToString() == "repos/owner/repo/branches/branch/protection/restrictions/teams"), + Arg.Is(u => u.ToString() == "repos/owner/repo/branches/branch/protection/restrictions/teams"), Arg.Any(), "application/vnd.github.loki-preview+json,application/vnd.github.hellcat-preview+json"); } @@ -1224,7 +1224,7 @@ namespace Octokit.Tests.Clients connection.Received() .Delete>( - Arg.Is(u => u.ToString() == "repositories/1/branches/branch/protection/restrictions/teams"), + Arg.Is(u => u.ToString() == "repositories/1/branches/branch/protection/restrictions/teams"), Arg.Any>(), "application/vnd.github.loki-preview+json,application/vnd.github.hellcat-preview+json"); } diff --git a/Octokit.Tests/Clients/SearchClientTests.cs b/Octokit.Tests/Clients/SearchClientTests.cs index d90f0e3e..ace933dd 100644 --- a/Octokit.Tests/Clients/SearchClientTests.cs +++ b/Octokit.Tests/Clients/SearchClientTests.cs @@ -1708,7 +1708,7 @@ namespace Octokit.Tests.Clients connection.Received().Get( Arg.Is(u => u.ToString() == "search/labels"), - Arg.Is>(d => + Arg.Is>(d => d["q"] == "something" && d["repository_id"] == "1"), "application/vnd.github.symmetra-preview+json"); @@ -1776,7 +1776,7 @@ namespace Octokit.Tests.Clients connection.Received().Get( Arg.Is(u => u.ToString() == "search/labels"), Arg.Is>(d => - d["q"] == "something" && + d["q"] == "something" && d["repository_id"] == "1"), "application/vnd.github.symmetra-preview+json"); } diff --git a/Octokit/Authentication/BearerTokenAuthenticator.cs b/Octokit/Authentication/BearerTokenAuthenticator.cs index 42757b50..2be100d7 100644 --- a/Octokit/Authentication/BearerTokenAuthenticator.cs +++ b/Octokit/Authentication/BearerTokenAuthenticator.cs @@ -3,7 +3,7 @@ using System.Globalization; namespace Octokit.Internal { - class BearerTokenAuthenticator: IAuthenticationHandler + class BearerTokenAuthenticator : IAuthenticationHandler { public void Authenticate(IRequest request, Credentials credentials) { diff --git a/Octokit/Models/Request/SearchLabelsRequest.cs b/Octokit/Models/Request/SearchLabelsRequest.cs index dc067c9a..9d106633 100644 --- a/Octokit/Models/Request/SearchLabelsRequest.cs +++ b/Octokit/Models/Request/SearchLabelsRequest.cs @@ -72,7 +72,7 @@ namespace Octokit /// [Parameter(Value = "created")] Created, - + /// /// search by last updated /// diff --git a/Octokit/Models/Response/Installation.cs b/Octokit/Models/Response/Installation.cs index cadf38bc..66ccaea8 100644 --- a/Octokit/Models/Response/Installation.cs +++ b/Octokit/Models/Response/Installation.cs @@ -53,7 +53,7 @@ namespace Octokit /// The type of the target (User or Organization) /// public StringEnum TargetType { get; protected set; } - + /// /// The Permissions granted to the Installation /// diff --git a/Octokit/Models/Response/InstallationPermissions.cs b/Octokit/Models/Response/InstallationPermissions.cs index 6aa0d548..1b892206 100644 --- a/Octokit/Models/Response/InstallationPermissions.cs +++ b/Octokit/Models/Response/InstallationPermissions.cs @@ -25,7 +25,7 @@ namespace Octokit OrganizationProjects = organizationProjects; TeamDiscussions = teamDiscussions; } - + /// /// Repository metadata /// Search repositories, list collaborators, and access repository metadata. diff --git a/Octokit/Models/Response/PullRequest.cs b/Octokit/Models/Response/PullRequest.cs index 51aa95da..115f4206 100644 --- a/Octokit/Models/Response/PullRequest.cs +++ b/Octokit/Models/Response/PullRequest.cs @@ -224,7 +224,7 @@ namespace Octokit /// Whether maintainers of the base repository can push to the HEAD branch /// public bool? MaintainerCanModify { get; protected set; } - + /// /// Users requested for review /// diff --git a/Octokit/Models/Response/Verification.cs b/Octokit/Models/Response/Verification.cs index e2b9fef3..109b3c9a 100644 --- a/Octokit/Models/Response/Verification.cs +++ b/Octokit/Models/Response/Verification.cs @@ -11,7 +11,7 @@ namespace Octokit public class Verification { public Verification() { } - + public Verification(bool verified, VerificationReason reason, string signature, string payload) { Verified = verified; diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 8c335938..89908e7f 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -1,3 +1,73 @@ +### New in 0.30.0 (released 17/06/2018) + +## Advisories and Breaking Changes + +- Note that the `IssuesLabelsClient.RemoveFromIssue()` methods which previously had no return value, will now return an `IReadonlyList