From 0f0a0dc2b52389bd477464efacec02038244fbb4 Mon Sep 17 00:00:00 2001 From: Ryan Gribble Date: Sat, 7 Oct 2017 13:15:14 +1000 Subject: [PATCH] Release v0.27 - On a Roll (#1687) * Fix integration test - protected branch status can now only be retrieved by an authorized user * Fix integration test - labels in octokit.net repo were renamed * Run build task "FormatCode" * Update release notes for v0.27 --- .../Clients/ObservableTeamsClient.cs | 2 +- .../Clients/RepositoryBranchesClientTests.cs | 4 --- .../Clients/SearchClientTests.cs | 2 +- Octokit/Clients/RepositoryBranchesClient.cs | 2 +- Octokit/Models/Request/NewTeam.cs | 2 +- ReleaseNotes.md | 30 +++++++++++++++++++ 6 files changed, 34 insertions(+), 8 deletions(-) diff --git a/Octokit.Reactive/Clients/ObservableTeamsClient.cs b/Octokit.Reactive/Clients/ObservableTeamsClient.cs index dec15fbf..39c75467 100644 --- a/Octokit.Reactive/Clients/ObservableTeamsClient.cs +++ b/Octokit.Reactive/Clients/ObservableTeamsClient.cs @@ -158,7 +158,7 @@ namespace Octokit.Reactive public IObservable GetAllMembers(int id, TeamMembersRequest request) { Ensure.ArgumentNotNull(request, nameof(request)); - + return GetAllMembers(id, request, ApiOptions.None); } diff --git a/Octokit.Tests.Integration/Clients/RepositoryBranchesClientTests.cs b/Octokit.Tests.Integration/Clients/RepositoryBranchesClientTests.cs index 5ea68239..595d85b0 100644 --- a/Octokit.Tests.Integration/Clients/RepositoryBranchesClientTests.cs +++ b/Octokit.Tests.Integration/Clients/RepositoryBranchesClientTests.cs @@ -19,8 +19,6 @@ public class RepositoryBranchesClientTests var branches = await github.Repository.Branch.GetAll("octokit", "octokit.net"); Assert.NotEmpty(branches); - - Assert.True(branches.First(x => x.Name == "master").Protected); } [IntegrationTest] @@ -31,8 +29,6 @@ public class RepositoryBranchesClientTests var branches = await github.Repository.Branch.GetAll(7528679); Assert.NotEmpty(branches); - - Assert.True(branches.First(x => x.Name == "master").Protected); } [IntegrationTest] diff --git a/Octokit.Tests.Integration/Clients/SearchClientTests.cs b/Octokit.Tests.Integration/Clients/SearchClientTests.cs index a00e4279..7f27b4d6 100644 --- a/Octokit.Tests.Integration/Clients/SearchClientTests.cs +++ b/Octokit.Tests.Integration/Clients/SearchClientTests.cs @@ -462,7 +462,7 @@ public class SearchClientTests public async Task SearchForExcludedLabels() { var label1 = "up-for-grabs"; - var label2 = "feature"; + var label2 = "\"category: feature\""; // Search for issues by include filter var request = new SearchIssuesRequest(); diff --git a/Octokit/Clients/RepositoryBranchesClient.cs b/Octokit/Clients/RepositoryBranchesClient.cs index 45f66ef8..baee963d 100644 --- a/Octokit/Clients/RepositoryBranchesClient.cs +++ b/Octokit/Clients/RepositoryBranchesClient.cs @@ -886,7 +886,7 @@ namespace Octokit [Obsolete("Please use GetAllProtectedBranchTeamRestrictions instead")] public Task> GetProtectedBranchTeamRestrictions(long repositoryId, string branch) { - return GetAllProtectedBranchTeamRestrictions(repositoryId, branch); + return GetAllProtectedBranchTeamRestrictions(repositoryId, branch); } /// diff --git a/Octokit/Models/Request/NewTeam.cs b/Octokit/Models/Request/NewTeam.cs index fc9716c9..23ba322d 100644 --- a/Octokit/Models/Request/NewTeam.cs +++ b/Octokit/Models/Request/NewTeam.cs @@ -66,7 +66,7 @@ namespace Octokit { get { - return string.Format(CultureInfo.InvariantCulture, "Name: {0} Privacy: {1} Permission: {2}", Name, Privacy?.ToString() ?? "Default", Permission?.ToString() ?? "Default" ); + return string.Format(CultureInfo.InvariantCulture, "Name: {0} Privacy: {1} Permission: {2}", Name, Privacy?.ToString() ?? "Default", Permission?.ToString() ?? "Default"); } } } diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 5ba9e78e..b411b6d3 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -1,9 +1,39 @@ +### New in 0.27.0 (released 7/10/2017) + +## Advisories and Breaking Changes + +- `NewTeam.Permission` has been changed to a nullable type `Permission?` and will no longer be sent unless explicitly set + +## Release Notes + +**Features/Enhancements** + +- Implement additional fields in `Team` response and `NewTeam` and `UpdateTeam` requests, for `Privacy`, `Maintainers` and `Description` where they were missing - [#1669](https://github.com/octokit/octokit.net/pull/1669) via [@ryangribble](https://github.com/ryangribble) +- Implement `Organization` filter in `ISearchClient.SearchCode()` - [#1672](https://github.com/octokit/octokit.net/pull/1672) via [@sepharg](https://github.com/sepharg), [@ryangribble](https://github.com/ryangribble) +- Implement team membership enhancements for role (Maintainer or Member) and state (Active or Pending) including new methods `TeamsClient.AddOrEditMembership()` and `TeamsClient.GetMembershipDetails()` and updating `TeamsClient.GetAllMembers()` to allow filtering by role. - [#1670](https://github.com/octokit/octokit.net/pull/1670) via [@ryangribble](https://github.com/ryangribble) +- Implement [Nested Teams API (Preview)](https://developer.github.com/changes/2017-08-30-preview-nested-teams/) - [#1682](https://github.com/octokit/octokit.net/pull/1682) via [@ryangribble](https://github.com/ryangribble) + +**Fixes** + +- Assembly versioning, NuGet package metadata and inter-package version dependencies should now be correct, after automating them via the build process - [#1660](https://github.com/octokit/octokit.net/pull/1660) via [@ryangribble](https://github.com/ryangribble), [@mderriey](https://github.com/mderriey) +- Octokit can now run in environments where `PlatformNotSupported` exception was encountered when initializing the API connection (eg AWS Lambda) - [#1660](https://github.com/octokit/octokit.net/pull/1660) via [@ryangribble](https://github.com/ryangribble), [@mderriey](https://github.com/mderriey) +- Intellisense should once again be available for Octokit libraries - sorry about that! - [#1674](https://github.com/octokit/octokit.net/pull/1674) via [@mderriey](https://github.com/mderriey) +- `ISearchClient.SearchRepo()` now uses the correct values for the `Forks` search qualifiers (`Include` or `Only`) - [#1680](https://github.com/octokit/octokit.net/pull/1680) via [@ryangribble](https://github.com/ryangribble) + +**Housekeeping** + +- Add convention tests to enforce API Pagination support and naming conventions - [#1659](https://github.com/octokit/octokit.net/pull/1659) via [@ryangribble](https://github.com/ryangribble) +- BranchProtection response class `EnforceAdmins` now provides a standard `ctor` allowing it to be mocked if required - [#1679](https://github.com/octokit/octokit.net/pull/1679) via [@ryangribble](https://github.com/ryangribble) + + ### New in 0.26.0 (released 31/8/2017) ## Advisories and Breaking Changes - This release contains the necessary Octokit changes to specify the `required_pull_request_reviews` field on Branch Protection updates, which becomes mandatory when the Protected Branches API [graduates from preview mode](https://developer.github.com/changes/2017-06-16-loki-preview-ending-soon/) on the 1st September +## Release Notes + **Features/Enhancements** - Implement `RequiredPullRequestReviews` support in `IRepositoryBranchesClient.UpdateBranchProtection` and additional granular methods to `GetReviewEnforcement`, `UpdateReviewEnforcement` and `RemoveReviewEnforcement` via [@M-Zuber](https://github.com/M-Zuber), [@ryangribble](https://github.com/ryangribble)